From b99e024faf6bb7334bb4397bcff5db7dcc3f3359 Mon Sep 17 00:00:00 2001 From: Joseph Young <80432516+jpy-git@users.noreply.github.com> Date: Wed, 5 Jan 2022 21:55:36 +0000 Subject: [PATCH] Fix shutil.chown stub (#6833) Co-authored-by: Akuli --- stdlib/shutil.pyi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stdlib/shutil.pyi b/stdlib/shutil.pyi index f4c492cac..bd733f7fd 100644 --- a/stdlib/shutil.pyi +++ b/stdlib/shutil.pyi @@ -61,7 +61,14 @@ class _ntuple_diskusage(NamedTuple): free: int def disk_usage(path: int | StrOrBytesPath) -> _ntuple_diskusage: ... -def chown(path: StrPath, user: str | int | None = ..., group: str | int | None = ...) -> None: ... +@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