diff --git a/pyhelm3/client.py b/pyhelm3/client.py index 14d6399..9b45510 100644 --- a/pyhelm3/client.py +++ b/pyhelm3/client.py @@ -96,7 +96,7 @@ async def pull_chart( devel: bool = False, repo: t.Optional[str] = None, version: t.Optional[str] = None - ) -> contextlib.AbstractAsyncContextManager[pathlib.Path]: + ) -> t.AsyncGenerator[Chart, None]: """ Context manager that pulls the specified chart and yields a chart object whose ref is the unpacked chart directory. diff --git a/pyhelm3/models.py b/pyhelm3/models.py index ef915e8..457d063 100644 --- a/pyhelm3/models.py +++ b/pyhelm3/models.py @@ -2,6 +2,7 @@ import enum import pathlib import typing as t +import annotated_types as at import yaml @@ -59,8 +60,8 @@ def validate_str_as(validate_type): #: Annotated string types for URLs -AnyUrl = t.Annotated[str, AfterValidator(validate_str_as(PydanticAnyUrl))] -HttpUrl = t.Annotated[str, AfterValidator(validate_str_as(PydanticHttpUrl))] +AnyUrl = at.Annotated[str, AfterValidator(validate_str_as(PydanticAnyUrl))] +HttpUrl = at.Annotated[str, AfterValidator(validate_str_as(PydanticHttpUrl))] class ChartDependency(BaseModel): diff --git a/setup.cfg b/setup.cfg index cb1eeb2..efe8ca9 100755 --- a/setup.cfg +++ b/setup.cfg @@ -13,5 +13,5 @@ zip_safe = False include_package_data = True packages = find: install_requires = - pydantic + pydantic>=2.0.0 pyyaml