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

This commit is contained in:
Akuli authored and GitHub committed 2021-08-08 09:26:35 -07:00
1 parent 11f54c3407
commit ce11072dbe
325 files changed
+2196 -2334

No files matched your search

+8 -8
View File
@@ -1,7 +1,7 @@
import os
import sys
from _typeshed import StrPath, SupportsRead, SupportsWrite
from typing import Any, AnyStr, Callable, Iterable, List, NamedTuple, Sequence, Set, Tuple, TypeVar, Union, overload
from typing import Any, AnyStr, Callable, Iterable, NamedTuple, Sequence, Set, Tuple, TypeVar, Union, overload
_PathT = TypeVar("_PathT", str, os.PathLike[str])
# Return value of some functions that may either return a path-like object that was passed in or
@@ -21,14 +21,14 @@ def copymode(src: StrPath, dst: StrPath, *, follow_symlinks: bool = ...) -> None
def copystat(src: StrPath, dst: StrPath, *, follow_symlinks: bool = ...) -> None: ...
def copy(src: StrPath, dst: StrPath, *, follow_symlinks: bool = ...) -> _PathReturn: ...
def copy2(src: StrPath, dst: StrPath, *, follow_symlinks: bool = ...) -> _PathReturn: ...
def ignore_patterns(*patterns: StrPath) -> Callable[[Any, List[str]], Set[str]]: ...
def ignore_patterns(*patterns: StrPath) -> Callable[[Any, list[str]], Set[str]]: ...
if sys.version_info >= (3, 8):
def copytree(
src: StrPath,
dst: StrPath,
symlinks: bool = ...,
ignore: None | Callable[[str, List[str]], Iterable[str]] | Callable[[StrPath, List[str]], Iterable[str]] = ...,
ignore: None | Callable[[str, list[str]], Iterable[str]] | Callable[[StrPath, list[str]], Iterable[str]] = ...,
copy_function: Callable[[str, str], None] = ...,
ignore_dangling_symlinks: bool = ...,
dirs_exist_ok: bool = ...,
@@ -39,7 +39,7 @@ else:
src: StrPath,
dst: StrPath,
symlinks: bool = ...,
ignore: None | Callable[[str, List[str]], Iterable[str]] | Callable[[StrPath, List[str]], Iterable[str]] = ...,
ignore: None | Callable[[str, list[str]], Iterable[str]] | Callable[[StrPath, list[str]], Iterable[str]] = ...,
copy_function: Callable[[str, str], None] = ...,
ignore_dangling_symlinks: bool = ...,
) -> _PathReturn: ...
@@ -83,11 +83,11 @@ def make_archive(
group: str | None = ...,
logger: Any | None = ...,
) -> str: ...
def get_archive_formats() -> List[Tuple[str, str]]: ...
def get_archive_formats() -> list[Tuple[str, str]]: ...
def register_archive_format(
name: str,
function: Callable[..., Any],
extra_args: Sequence[Tuple[str, Any] | List[Any]] | None = ...,
extra_args: Sequence[Tuple[str, Any] | list[Any]] | None = ...,
description: str = ...,
) -> None: ...
def unregister_archive_format(name: str) -> None: ...
@@ -100,8 +100,8 @@ else:
def unpack_archive(filename: str, extract_dir: StrPath | None = ..., format: str | None = ...) -> None: ...
def register_unpack_format(
name: str, extensions: List[str], function: Any, extra_args: Sequence[Tuple[str, Any]] | None = ..., description: str = ...
name: str, extensions: list[str], function: Any, extra_args: Sequence[Tuple[str, Any]] | None = ..., description: str = ...
) -> None: ...
def unregister_unpack_format(name: str) -> None: ...
def get_unpack_formats() -> List[Tuple[str, List[str], str]]: ...
def get_unpack_formats() -> list[Tuple[str, list[str], str]]: ...
def get_terminal_size(fallback: Tuple[int, int] = ...) -> os.terminal_size: ...