lowercase list and dict in the rest of stdlib (#5892)

This commit is contained in:
Akuli
2021-08-09 01:13:08 +03:00
committed by GitHub
parent 191aac3b0e
commit 9af9cca7f3
5 changed files with 53 additions and 49 deletions

View File

@@ -5,7 +5,7 @@ from _typeshed import Self, StrOrBytesPath, StrPath
from collections.abc import Callable, Iterable, Iterator, Mapping
from gzip import _ReadableFileobj as _GzipReadableFileobj, _WritableFileobj as _GzipWritableFileobj
from types import TracebackType
from typing import IO, Dict, List, Protocol, Set, Tuple, Type, TypeVar, overload
from typing import IO, Protocol, Set, Tuple, Type, TypeVar, overload
from typing_extensions import Literal
_TF = TypeVar("_TF", bound=TarFile)
@@ -66,7 +66,7 @@ SUPPORTED_TYPES: Tuple[bytes, ...]
REGULAR_TYPES: Tuple[bytes, ...]
GNU_TYPES: Tuple[bytes, ...]
PAX_FIELDS: Tuple[str, ...]
PAX_NUMBER_FIELDS: Dict[str, type]
PAX_NUMBER_FIELDS: dict[str, type]
PAX_NAME_FIELDS: Set[str]
ENCODING: str
@@ -92,6 +92,8 @@ def open(
class ExFileObject(io.BufferedReader):
def __init__(self, tarfile: TarFile, tarinfo: TarInfo) -> None: ...
_list = list # conflicts with method name
class TarFile:
OPEN_METH: Mapping[str, str]
name: StrOrBytesPath | None
@@ -254,9 +256,9 @@ class TarFile:
errorlevel: int | None = ...,
) -> _TF: ...
def getmember(self, name: str) -> TarInfo: ...
def getmembers(self) -> List[TarInfo]: ...
def getnames(self) -> List[str]: ...
def list(self, verbose: bool = ..., *, members: List[TarInfo] | None = ...) -> None: ...
def getmembers(self) -> _list[TarInfo]: ...
def getnames(self) -> _list[str]: ...
def list(self, verbose: bool = ..., *, members: _list[TarInfo] | None = ...) -> None: ...
def next(self) -> TarInfo | None: ...
def extractall(
self, path: StrOrBytesPath = ..., members: Iterable[TarInfo] | None = ..., *, numeric_owner: bool = ...