Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -8,7 +8,7 @@ from .util import FileWrapper
_exc_info = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
def format_date_time(timestamp: Optional[float]) -> str: ... # undocumented
def format_date_time(timestamp: float | None) -> str: ... # undocumented
def read_environ() -> Dict[str, str]: ...
class BaseHandler:
@@ -19,14 +19,14 @@ class BaseHandler:
origin_server: bool
http_version: str
server_software: Optional[str]
server_software: str | None
os_environ: MutableMapping[str, str]
wsgi_file_wrapper: Optional[Type[FileWrapper]]
wsgi_file_wrapper: Type[FileWrapper] | None
headers_class: Type[Headers] # undocumented
traceback_limit: Optional[int]
traceback_limit: int | None
error_status: str
error_headers: List[Tuple[str, str]]
error_body: bytes
@@ -37,7 +37,7 @@ class BaseHandler:
def set_content_length(self) -> None: ...
def cleanup_headers(self) -> None: ...
def start_response(
self, status: str, headers: List[Tuple[str, str]], exc_info: Optional[_exc_info] = ...
self, status: str, headers: List[Tuple[str, str]], exc_info: _exc_info | None = ...
) -> Callable[[bytes], None]: ...
def send_preamble(self) -> None: ...
def write(self, data: bytes) -> None: ...