diff --git a/HISTORY.md b/HISTORY.md index f7309295..6cb0be69 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,8 @@ # cloudpathlib Changelog +## UNRELEASED + - Add "CloudPath" as return type on `__init__` for mypy issues. ([Issue #179](https://github.com/drivendataorg/cloudpathlib/issues/179), [PR #342](https://github.com/drivendataorg/cloudpathlib/pull/342)) + ## v0.15.1 (2023-07-12) - Compatibility with pydantic >= 2.0.0. ([PR #349](https://github.com/drivendataorg/cloudpathlib/pull/349)) diff --git a/cloudpathlib/cloudpath.py b/cloudpathlib/cloudpath.py index 13e903e2..09fdb492 100644 --- a/cloudpathlib/cloudpath.py +++ b/cloudpathlib/cloudpath.py @@ -198,7 +198,7 @@ class CloudPath(metaclass=CloudPathMeta): def __init__( self, - cloud_path: Union[str, Self], + cloud_path: Union[str, Self, "CloudPath"], client: Optional["Client"] = None, ) -> None: # handle if local file gets opened. must be set at the top of the method in case any code