Skip to content

Commit

Permalink
Fix wrong comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi committed Jul 31, 2023
1 parent 6723770 commit e1c6377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudpathlib/cloudpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def _patched_close_empty_cache(*args, **kwargs):
return buffer

def replace(self, target: Self) -> Self:
if type(self) is type(target):
if type(self) is not type(target):
raise TypeError(
f"The target based to rename must be an instantiated class of type: {type(self)}"
)
Expand Down

0 comments on commit e1c6377

Please sign in to comment.