Skip to content

Commit

Permalink
Add a comment explaining why shutil.move doesn't allow bytes/Pathlike…
Browse files Browse the repository at this point in the history
…[bytes] args (#6832)
  • Loading branch information
jpy-git committed Jan 8, 2022
1 parent 28a5e6b commit 0e5a00b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stdlib/shutil.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def rmtree(path: StrOrBytesPath, ignore_errors: bool = ..., onerror: Callable[[A

_CopyFn = Union[Callable[[str, str], None], Callable[[StrPath, StrPath], None]]

# N.B. shutil.move appears to take bytes arguments, however,
# this does not work when dst is (or is within) an existing directory.
# (#6832)
if sys.version_info >= (3, 9):
def move(src: StrPath, dst: StrPath, copy_function: _CopyFn = ...) -> _PathReturn: ...

Expand Down

0 comments on commit 0e5a00b

Please sign in to comment.