Use lowercase tuple where possible (#6170)

This commit is contained in:
Akuli
2021-10-15 00:18:19 +00:00
committed by GitHub
parent 5f386b0575
commit 994b69ef8f
242 changed files with 1212 additions and 1224 deletions

View File

@@ -27,7 +27,7 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
@overload
def __init__(self) -> None: ...
@overload
def __init__(self, __other: Mapping[_KT, _VT] | Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
def __init__(self, __other: Mapping[_KT, _VT] | Iterable[tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
def __len__(self) -> int: ...
def __getitem__(self, k: _KT) -> _VT: ...
def __setitem__(self, k: _KT, v: _VT) -> None: ...
@@ -39,7 +39,7 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
# These are incompatible with Mapping
def keys(self) -> Iterator[_KT]: ... # type: ignore
def values(self) -> Iterator[_VT]: ... # type: ignore
def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore
def items(self) -> Iterator[tuple[_KT, _VT]]: ... # type: ignore
def itervaluerefs(self) -> Iterator[KeyedRef[_KT, _VT]]: ...
def valuerefs(self) -> list[KeyedRef[_KT, _VT]]: ...
@@ -53,7 +53,7 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
@overload
def __init__(self, dict: None = ...) -> None: ...
@overload
def __init__(self, dict: Mapping[_KT, _VT] | Iterable[Tuple[_KT, _VT]]) -> None: ...
def __init__(self, dict: Mapping[_KT, _VT] | Iterable[tuple[_KT, _VT]]) -> None: ...
def __len__(self) -> int: ...
def __getitem__(self, k: _KT) -> _VT: ...
def __setitem__(self, k: _KT, v: _VT) -> None: ...
@@ -65,13 +65,13 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
# These are incompatible with Mapping
def keys(self) -> Iterator[_KT]: ... # type: ignore
def values(self) -> Iterator[_VT]: ... # type: ignore
def items(self) -> Iterator[Tuple[_KT, _VT]]: ... # type: ignore
def items(self) -> Iterator[tuple[_KT, _VT]]: ... # type: ignore
def keyrefs(self) -> list[ref[_KT]]: ...
class finalize:
def __init__(self, __obj: object, __func: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ...
def __call__(self, _: Any = ...) -> Any | None: ...
def detach(self) -> Tuple[Any, Any, Tuple[Any, ...], dict[str, Any]] | None: ...
def peek(self) -> Tuple[Any, Any, Tuple[Any, ...], dict[str, Any]] | None: ...
def detach(self) -> tuple[Any, Any, Tuple[Any, ...], dict[str, Any]] | None: ...
def peek(self) -> tuple[Any, Any, Tuple[Any, ...], dict[str, Any]] | None: ...
alive: bool
atexit: bool