mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 21:31:09 +08:00
Big diff: use lower-case list and dict (#5888)
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
# See the README.md file in this directory for more information.
|
||||
|
||||
from sys import _OptExcInfo
|
||||
from typing import Any, Callable, Dict, Iterable, List, Protocol, Tuple
|
||||
from typing import Any, Callable, Dict, Iterable, Protocol, Tuple
|
||||
|
||||
# stable
|
||||
class StartResponse(Protocol):
|
||||
def __call__(
|
||||
self, status: str, headers: List[Tuple[str, str]], exc_info: _OptExcInfo | None = ...
|
||||
self, status: str, headers: list[Tuple[str, str]], exc_info: _OptExcInfo | None = ...
|
||||
) -> Callable[[bytes], Any]: ...
|
||||
|
||||
WSGIEnvironment = Dict[str, Any] # stable
|
||||
@@ -18,14 +18,14 @@ WSGIApplication = Callable[[WSGIEnvironment, StartResponse], Iterable[bytes]] #
|
||||
class InputStream(Protocol):
|
||||
def read(self, size: int = ...) -> bytes: ...
|
||||
def readline(self, size: int = ...) -> bytes: ...
|
||||
def readlines(self, hint: int = ...) -> List[bytes]: ...
|
||||
def readlines(self, hint: int = ...) -> list[bytes]: ...
|
||||
def __iter__(self) -> Iterable[bytes]: ...
|
||||
|
||||
# WSGI error streams per PEP 3333, stable
|
||||
class ErrorStream(Protocol):
|
||||
def flush(self) -> None: ...
|
||||
def write(self, s: str) -> None: ...
|
||||
def writelines(self, seq: List[str]) -> None: ...
|
||||
def writelines(self, seq: list[str]) -> None: ...
|
||||
|
||||
class _Readable(Protocol):
|
||||
def read(self, size: int = ...) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user