Use lowercase type everywhere (#6853)

This commit is contained in:
Alex Waygood
2022-01-08 15:09:29 +00:00
committed by GitHub
parent f8501d33c7
commit a40d79a4e6
172 changed files with 728 additions and 761 deletions

View File

@@ -11,7 +11,7 @@ from _typeshed import (
from io import BufferedRandom, BufferedReader, BufferedWriter, FileIO, TextIOWrapper
from os import PathLike, stat_result
from types import TracebackType
from typing import IO, Any, BinaryIO, Generator, Sequence, Type, TypeVar, overload
from typing import IO, Any, BinaryIO, Generator, Sequence, TypeVar, overload
from typing_extensions import Literal
if sys.version_info >= (3, 9):
@@ -28,7 +28,7 @@ class PurePath(PathLike[str]):
suffix: str
suffixes: list[str]
stem: str
def __new__(cls: Type[_P], *args: StrPath) -> _P: ...
def __new__(cls: type[_P], *args: StrPath) -> _P: ...
def __hash__(self) -> int: ...
def __lt__(self, other: PurePath) -> bool: ...
def __le__(self, other: PurePath) -> bool: ...
@@ -61,13 +61,13 @@ class PurePosixPath(PurePath): ...
class PureWindowsPath(PurePath): ...
class Path(PurePath):
def __new__(cls: Type[_P], *args: StrPath, **kwargs: Any) -> _P: ...
def __new__(cls: type[_P], *args: StrPath, **kwargs: Any) -> _P: ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
) -> bool | None: ...
@classmethod
def cwd(cls: Type[_P]) -> _P: ...
def cwd(cls: type[_P]) -> _P: ...
if sys.version_info >= (3, 10):
def stat(self, *, follow_symlinks: bool = ...) -> stat_result: ...
def chmod(self, mode: int, *, follow_symlinks: bool = ...) -> None: ...
@@ -166,7 +166,7 @@ class Path(PurePath):
else:
def unlink(self) -> None: ...
@classmethod
def home(cls: Type[_P]) -> _P: ...
def home(cls: type[_P]) -> _P: ...
def absolute(self: _P) -> _P: ...
def expanduser(self: _P) -> _P: ...
def read_bytes(self) -> bytes: ...