mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 14:46:55 +08:00
Added __class_getitem__ (#4695)
Resolves #4682 Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user