mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user