From 739cc27cc4371a58a25f8a52b6b8b05087f2b55d Mon Sep 17 00:00:00 2001 From: Akuli Date: Mon, 25 Oct 2021 09:52:04 +0000 Subject: [PATCH] fix shutil.disk_usage() argument type (#6197) --- stdlib/shutil.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/shutil.pyi b/stdlib/shutil.pyi index 98d0d0682..12341d72e 100644 --- a/stdlib/shutil.pyi +++ b/stdlib/shutil.pyi @@ -1,6 +1,6 @@ import os import sys -from _typeshed import StrPath, SupportsRead, SupportsWrite +from _typeshed import StrOrBytesPath, StrPath, SupportsRead, SupportsWrite from typing import Any, AnyStr, Callable, Iterable, NamedTuple, Sequence, Set, TypeVar, Union, overload _PathT = TypeVar("_PathT", str, os.PathLike[str]) @@ -60,7 +60,7 @@ class _ntuple_diskusage(NamedTuple): used: int free: int -def disk_usage(path: StrPath) -> _ntuple_diskusage: ... +def disk_usage(path: int | StrOrBytesPath) -> _ntuple_diskusage: ... def chown(path: StrPath, user: str | int | None = ..., group: str | int | None = ...) -> None: ... if sys.version_info >= (3, 8):