mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
clean python 3 specific stuff from stdlib/@python2 stubs (#5451)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user