Third-party stubs: audit Callable[<parameters>, None] annotations (#8175)

This commit is contained in:
Alex Waygood
2022-06-26 12:56:19 +01:00
committed by GitHub
parent 49cdaa41db
commit 74bd0d962b
10 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ class _triggerbase:
def handle_connect(self) -> None: ...
def handle_close(self) -> None: ...
def close(self) -> None: ...
def pull_trigger(self, thunk: Callable[[None], None] | None = ...) -> None: ...
def pull_trigger(self, thunk: Callable[[None], object] | None = ...) -> None: ...
def handle_read(self) -> None: ...
if sys.platform == "linux" or sys.platform == "darwin":
+3 -2
View File
@@ -1,4 +1,5 @@
from collections.abc import Callable, Mapping, Sequence
from _typeshed.wsgi import StartResponse
from collections.abc import Iterator, Mapping, Sequence
from logging import Logger
from typing import Any, Match, Pattern
@@ -43,7 +44,7 @@ class Error:
body: str = ...
def __init__(self, body: str) -> None: ...
def to_response(self) -> tuple[str, Sequence[tuple[str, str]], str]: ...
def wsgi_response(self, environ: Any, start_response: Callable[[str, Sequence[tuple[str, str]]], None]) -> str: ...
def wsgi_response(self, environ: Any, start_response: StartResponse) -> Iterator[str]: ...
class BadRequest(Error):
code: int = ...