mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Big diff: use lower-case list and dict (#5888)
This commit is contained in:
@@ -2,22 +2,7 @@ import sys
|
||||
import types
|
||||
from _typeshed import Self
|
||||
from abc import abstractmethod
|
||||
from typing import (
|
||||
IO,
|
||||
Any,
|
||||
BinaryIO,
|
||||
Callable,
|
||||
Generator,
|
||||
Iterable,
|
||||
Iterator,
|
||||
List,
|
||||
Protocol,
|
||||
TextIO,
|
||||
Tuple,
|
||||
Type,
|
||||
TypeVar,
|
||||
overload,
|
||||
)
|
||||
from typing import IO, Any, BinaryIO, Callable, Generator, Iterable, Iterator, Protocol, TextIO, Tuple, Type, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
# TODO: this only satisfies the most common interface, where
|
||||
@@ -204,7 +189,7 @@ class StreamReader(Codec):
|
||||
def __init__(self, stream: IO[bytes], errors: str = ...) -> None: ...
|
||||
def read(self, size: int = ..., chars: int = ..., firstline: bool = ...) -> str: ...
|
||||
def readline(self, size: int | None = ..., keepends: bool = ...) -> str: ...
|
||||
def readlines(self, sizehint: int | None = ..., keepends: bool = ...) -> List[str]: ...
|
||||
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: ...
|
||||
@@ -219,7 +204,7 @@ class StreamReaderWriter(TextIO):
|
||||
def __init__(self, stream: IO[bytes], Reader: _StreamReader, Writer: _StreamWriter, errors: str = ...) -> None: ...
|
||||
def read(self, size: int = ...) -> str: ...
|
||||
def readline(self, size: int | None = ...) -> str: ...
|
||||
def readlines(self, sizehint: int | None = ...) -> List[str]: ...
|
||||
def readlines(self, sizehint: int | None = ...) -> list[str]: ...
|
||||
def __next__(self) -> str: ...
|
||||
def __iter__(self: _T) -> _T: ...
|
||||
# This actually returns None, but that's incompatible with the supertype
|
||||
@@ -257,7 +242,7 @@ class StreamRecoder(BinaryIO):
|
||||
) -> None: ...
|
||||
def read(self, size: int = ...) -> bytes: ...
|
||||
def readline(self, size: int | None = ...) -> bytes: ...
|
||||
def readlines(self, sizehint: int | None = ...) -> List[bytes]: ...
|
||||
def readlines(self, sizehint: int | None = ...) -> list[bytes]: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def __iter__(self: _SRT) -> _SRT: ...
|
||||
def write(self, data: bytes) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user