Added __class_getitem__ (#4695)

Resolves #4682

Co-authored-by: hauntsaninja <>
This commit is contained in:
Utsav
2020-10-23 02:35:04 +05:30
committed by GitHub
parent 5927e5ca30
commit 6f943d43ea
32 changed files with 205 additions and 6 deletions

View File

@@ -1,10 +1,13 @@
# Stubs for filecmp (Python 2/3)
import sys
from typing import AnyStr, Callable, Dict, Generic, Iterable, List, Optional, Sequence, Text, Tuple, Union
from typing import Any, AnyStr, Callable, Dict, Generic, Iterable, List, Optional, Sequence, Text, Tuple, Union
if sys.version_info >= (3, 6):
from os import PathLike
if sys.version_info >= (3, 9):
from types import GenericAlias
DEFAULT_IGNORES: List[str]
if sys.version_info >= (3, 6):
@@ -41,7 +44,6 @@ class dircmp(Generic[AnyStr]):
right: AnyStr
hide: Sequence[AnyStr]
ignore: Sequence[AnyStr]
# These properties are created at runtime by __getattr__
subdirs: Dict[AnyStr, dircmp[AnyStr]]
same_files: List[AnyStr]
@@ -65,6 +67,8 @@ class dircmp(Generic[AnyStr]):
def phase3(self) -> None: ...
def phase4(self) -> None: ...
def phase4_closure(self) -> None: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
if sys.version_info >= (3,):
def clear_cache() -> None: ...