Files
typeshed/stdlib/2and3/asynchat.pyi
Jelle Zijlstra b6eec58d2c remove checks against patch versions (#987)
Both mypy and pytype only use the major and minor version in type checking. Using
checks like "sys.version_info >= (3, 4, 4)" won't actually work properly for
people type checking their code using version 3.4, because (3, 4) >= (3, 4, 4) will
always be false (at least in mypy's approach; not sure if pytype is different).
2017-03-12 20:16:09 -07:00

42 lines
1.5 KiB
Python

from abc import abstractmethod
import asyncore
import socket
import sys
from typing import Union, Tuple, Sequence
class simple_producer:
def __init__(self, data: str, buffer_size: int = ...) -> None: ...
def more(self) -> str: ...
class async_chat (asyncore.dispatcher):
ac_in_buffer_size = ... # type: int
ac_out_buffer_size = ... # type: int
def __init__(self, sock: socket.socket = None, map: asyncore._maptype = None) -> None: ...
@abstractmethod
def collect_incoming_data(self, data: str) -> None: ...
@abstractmethod
def found_terminator(self) -> None: ...
def set_terminator(self, term: Union[str, int, None]) -> None: ...
def get_terminator(self) -> Union[str, int, None]: ...
def handle_read(self) -> None: ...
def handle_write(self) -> None: ...
def handle_close(self) -> None: ...
def push(self, data: str) -> None: ...
def push_with_producer(self, producer: simple_producer) -> None: ...
def readable(self) -> bool: ...
def writable(self) -> bool: ...
def close_when_done(self) -> None: ...
def initiate_send(self) -> None: ...
def discard_buffers(self) -> None: ...
if sys.version_info < (3, 0):
class fifo:
def __init__(self, list: Sequence[Union[str, simple_producer]] = ...) -> None: ...
def __len__(self) -> int: ...
def is_empty(self) -> bool: ...
def first(self) -> str: ...
def push(self, data: Union[str, simple_producer]) -> None: ...
def pop(self) -> Tuple[int, str]: ...