mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
stdlib: audit more callback annotations (#8209)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user