Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -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: ...