mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 02:41:16 +08:00
stdlib: shutil.chown does not work on Windows (#7384)
This commit is contained in:
committed by
Jelle Zijlstra
parent
d63dc4b002
commit
8034c1c48c
@@ -100,14 +100,18 @@ class _ntuple_diskusage(NamedTuple):
|
||||
free: int
|
||||
|
||||
def disk_usage(path: int | StrOrBytesPath) -> _ntuple_diskusage: ...
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: str | int, group: None = ...) -> None: ...
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: None = ..., *, group: str | int) -> None: ...
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: None, group: str | int) -> None: ...
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: str | int, group: str | int) -> None: ...
|
||||
|
||||
if sys.platform != "win32":
|
||||
# while chown can be imported on Windows it doesn't actually work
|
||||
# see https://bugs.python.org/issue33140
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: str | int, group: None = ...) -> None: ...
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: None = ..., *, group: str | int) -> None: ...
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: None, group: str | int) -> None: ...
|
||||
@overload
|
||||
def chown(path: StrOrBytesPath, user: str | int, group: str | int) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user