mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Use lowercase type everywhere (#6853)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user