Skip to content

Commit

Permalink
Prevent SMBPath.rename warnings when using defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- authored Aug 28, 2024
1 parent 320425f commit f49d21b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upath/implementations/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def rename(
maxdepth: int | None = _unset,
**kwargs: Any,
) -> Self:
if kwargs.pop("recursive", None) is not None:
if recursive is not _unset:
warnings.warn(
"SMBPath.rename(): recursive is currently ignored.",
UserWarning,
stacklevel=2,
)
if kwargs.pop("maxdepth", None) is not None:
if maxdepth is not _unset:
warnings.warn(
"SMBPath.rename(): maxdepth is currently ignored.",
UserWarning,
Expand Down

0 comments on commit f49d21b

Please sign in to comment.