stdlib: audit more callback annotations (#8209)

This commit is contained in:
Alex Waygood
2022-07-19 15:07:25 +01:00
committed by GitHub
parent 540a6b25bf
commit e2ce7c6344
21 changed files with 61 additions and 64 deletions

View File

@@ -1,6 +1,7 @@
from _typeshed.wsgi import ErrorStream, InputStream, WSGIApplication
from collections.abc import Callable, Iterable, Iterator
from typing import Any, NoReturn
from typing_extensions import TypeAlias
__all__ = ["validator"]
@@ -25,9 +26,11 @@ class ErrorWrapper:
def writelines(self, seq: Iterable[str]) -> None: ...
def close(self) -> NoReturn: ...
_WriterCallback: TypeAlias = Callable[[bytes], Any]
class WriteWrapper:
writer: Callable[[bytes], Any]
def __init__(self, wsgi_writer: Callable[[bytes], Any]) -> None: ...
writer: _WriterCallback
def __init__(self, wsgi_writer: _WriterCallback) -> None: ...
def __call__(self, s: bytes) -> None: ...
class PartialIteratorWrapper: