mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use lowercase type everywhere (#6853)
This commit is contained in:
@@ -2,7 +2,7 @@ import sys
|
||||
import types
|
||||
from _typeshed import Self
|
||||
from abc import abstractmethod
|
||||
from typing import IO, Any, BinaryIO, Callable, Generator, Iterable, Iterator, Protocol, TextIO, Type, TypeVar, overload
|
||||
from typing import IO, Any, BinaryIO, Callable, Generator, Iterable, Iterator, Protocol, TextIO, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
BOM32_BE: Literal[b"\xfe\xff"]
|
||||
@@ -186,7 +186,7 @@ class StreamWriter(Codec):
|
||||
def writelines(self, list: Iterable[str]) -> None: ...
|
||||
def reset(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, typ: Type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __getattr__(self, name: str, getattr: Callable[[str], Any] = ...) -> Any: ...
|
||||
|
||||
class StreamReader(Codec):
|
||||
@@ -197,7 +197,7 @@ class StreamReader(Codec):
|
||||
def readlines(self, sizehint: int | None = ..., keepends: bool = ...) -> list[str]: ...
|
||||
def reset(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, typ: Type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __getattr__(self, name: str, getattr: Callable[[str], Any] = ...) -> Any: ...
|
||||
|
||||
@@ -219,7 +219,7 @@ class StreamReaderWriter(TextIO):
|
||||
# Same as write()
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, typ: Type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __exit__(self, typ: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
# These methods don't actually exist directly, but they are needed to satisfy the TextIO
|
||||
# interface. At runtime, they are delegated through __getattr__.
|
||||
@@ -255,7 +255,7 @@ class StreamRecoder(BinaryIO):
|
||||
def reset(self) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, type: Type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, tb: types.TracebackType | None) -> None: ...
|
||||
# These methods don't actually exist directly, but they are needed to satisfy the BinaryIO
|
||||
# interface. At runtime, they are delegated through __getattr__.
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user