add missing type hints for __class_getitem__ (#5869)

This commit is contained in:
Anton Grübel
2021-08-07 23:12:53 +09:00
committed by GitHub
parent 1cd719ba8d
commit 39ede0242c
4 changed files with 18 additions and 0 deletions

View File

@@ -311,6 +311,8 @@ class stat_result:
@runtime_checkable
class PathLike(Protocol[_AnyStr_co]):
def __fspath__(self) -> _AnyStr_co: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
_FdOrAnyPath = Union[int, StrOrBytesPath]