Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -1,6 +1,6 @@
import sys
from _typeshed import Self
from typing import Any, Dict, Generic, List, NoReturn, Tuple, Type, TypeVar, overload
from typing import Any, Dict, Generic, NoReturn, Tuple, Type, TypeVar, overload
if sys.version_info >= (3, 10):
from typing import (
@@ -41,7 +41,7 @@ else:
) -> Type[Tuple[Any, ...]]: ...
class UserDict(MutableMapping[_KT, _VT]):
data: Dict[_KT, _VT]
data: dict[_KT, _VT]
def __init__(self, __dict: Mapping[_KT, _VT] | None = ..., **kwargs: _VT) -> None: ...
def __len__(self) -> int: ...
def __getitem__(self, key: _KT) -> _VT: ...
@@ -54,7 +54,7 @@ class UserDict(MutableMapping[_KT, _VT]):
def fromkeys(cls: Type[_S], iterable: Iterable[_KT], value: _VT | None = ...) -> _S: ...
class UserList(MutableSequence[_T]):
data: List[_T]
data: list[_T]
def __init__(self, initlist: Iterable[_T] | None = ...) -> None: ...
def __lt__(self, other: object) -> bool: ...
def __le__(self, other: object) -> bool: ...
@@ -138,10 +138,10 @@ class UserString(Sequence[str]):
def lstrip(self: _UserStringT, chars: str | None = ...) -> _UserStringT: ...
@staticmethod
@overload
def maketrans(x: Dict[int, _T] | Dict[str, _T] | Dict[str | int, _T]) -> Dict[int, _T]: ...
def maketrans(x: dict[int, _T] | dict[str, _T] | dict[str | int, _T]) -> dict[int, _T]: ...
@staticmethod
@overload
def maketrans(x: str, y: str, z: str = ...) -> Dict[int, int | None]: ...
def maketrans(x: str, y: str, z: str = ...) -> dict[int, int | None]: ...
def partition(self, sep: str) -> Tuple[str, str, str]: ...
if sys.version_info >= (3, 9):
def removeprefix(self: _UserStringT, __prefix: str | UserString) -> _UserStringT: ...
@@ -152,9 +152,9 @@ class UserString(Sequence[str]):
def rjust(self: _UserStringT, width: int, *args: Any) -> _UserStringT: ...
def rpartition(self, sep: str) -> Tuple[str, str, str]: ...
def rstrip(self: _UserStringT, chars: str | None = ...) -> _UserStringT: ...
def split(self, sep: str | None = ..., maxsplit: int = ...) -> List[str]: ...
def rsplit(self, sep: str | None = ..., maxsplit: int = ...) -> List[str]: ...
def splitlines(self, keepends: bool = ...) -> List[str]: ...
def split(self, sep: str | None = ..., maxsplit: int = ...) -> list[str]: ...
def rsplit(self, sep: str | None = ..., maxsplit: int = ...) -> list[str]: ...
def splitlines(self, keepends: bool = ...) -> list[str]: ...
def startswith(self, prefix: str | Tuple[str, ...], start: int | None = ..., end: int | None = ...) -> bool: ...
def strip(self: _UserStringT, chars: str | None = ...) -> _UserStringT: ...
def swapcase(self: _UserStringT) -> _UserStringT: ...
@@ -214,7 +214,7 @@ class Counter(Dict[_T, int], Generic[_T]):
def __init__(self, __iterable: Iterable[_T]) -> None: ...
def copy(self: _S) -> _S: ...
def elements(self) -> Iterator[_T]: ...
def most_common(self, n: int | None = ...) -> List[Tuple[_T, int]]: ...
def most_common(self, n: int | None = ...) -> list[Tuple[_T, int]]: ...
@classmethod
def fromkeys(cls, iterable: Any, v: int | None = ...) -> NoReturn: ... # type: ignore
@overload
@@ -284,7 +284,7 @@ class defaultdict(Dict[_KT, _VT], Generic[_KT, _VT]):
def copy(self: _S) -> _S: ...
class ChainMap(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
maps: List[Mapping[_KT, _VT]]
maps: list[Mapping[_KT, _VT]]
def __init__(self, *maps: Mapping[_KT, _VT]) -> None: ...
def new_child(self, m: Mapping[_KT, _VT] | None = ...) -> ChainMap[_KT, _VT]: ...
@property