clean python 3 specific stuff from stdlib/@python2 stubs (#5451)

This commit is contained in:
Akuli
2021-05-15 01:19:05 +03:00
committed by GitHub
parent f94d838814
commit 5ec4f06263
121 changed files with 1024 additions and 4801 deletions

View File

@@ -1,44 +1,17 @@
import sys
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):
def cmp(
f1: Union[bytes, Text, PathLike[AnyStr]], f2: Union[bytes, Text, PathLike[AnyStr]], shallow: Union[int, bool] = ...
) -> bool: ...
def cmpfiles(
a: Union[AnyStr, PathLike[AnyStr]],
b: Union[AnyStr, PathLike[AnyStr]],
common: Iterable[AnyStr],
shallow: Union[int, bool] = ...,
) -> Tuple[List[AnyStr], List[AnyStr], List[AnyStr]]: ...
else:
def cmp(f1: Union[bytes, Text], f2: Union[bytes, Text], shallow: Union[int, bool] = ...) -> bool: ...
def cmpfiles(
a: AnyStr, b: AnyStr, common: Iterable[AnyStr], shallow: Union[int, bool] = ...
) -> Tuple[List[AnyStr], List[AnyStr], List[AnyStr]]: ...
def cmp(f1: Union[bytes, Text], f2: Union[bytes, Text], shallow: Union[int, bool] = ...) -> bool: ...
def cmpfiles(
a: AnyStr, b: AnyStr, common: Iterable[AnyStr], shallow: Union[int, bool] = ...
) -> Tuple[List[AnyStr], List[AnyStr], List[AnyStr]]: ...
class dircmp(Generic[AnyStr]):
if sys.version_info >= (3, 6):
def __init__(
self,
a: Union[AnyStr, PathLike[AnyStr]],
b: Union[AnyStr, PathLike[AnyStr]],
ignore: Optional[Sequence[AnyStr]] = ...,
hide: Optional[Sequence[AnyStr]] = ...,
) -> None: ...
else:
def __init__(
self, a: AnyStr, b: AnyStr, ignore: Optional[Sequence[AnyStr]] = ..., hide: Optional[Sequence[AnyStr]] = ...
) -> None: ...
def __init__(
self, a: AnyStr, b: AnyStr, ignore: Optional[Sequence[AnyStr]] = ..., hide: Optional[Sequence[AnyStr]] = ...
) -> None: ...
left: AnyStr
right: AnyStr
hide: Sequence[AnyStr]
@@ -66,8 +39,3 @@ 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: ...