Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,7 +1,6 @@
import asyncore
import socket
from abc import abstractmethod
from typing import Optional, Union
class simple_producer:
def __init__(self, data: bytes, buffer_size: int = ...) -> None: ...
@@ -10,13 +9,13 @@ class simple_producer:
class async_chat(asyncore.dispatcher):
ac_in_buffer_size: int
ac_out_buffer_size: int
def __init__(self, sock: Optional[socket.socket] = ..., map: Optional[asyncore._maptype] = ...) -> None: ...
def __init__(self, sock: socket.socket | None = ..., map: asyncore._maptype | None = ...) -> None: ...
@abstractmethod
def collect_incoming_data(self, data: bytes) -> None: ...
@abstractmethod
def found_terminator(self) -> None: ...
def set_terminator(self, term: Union[bytes, int, None]) -> None: ...
def get_terminator(self) -> Union[bytes, int, None]: ...
def set_terminator(self, term: bytes | int | None) -> None: ...
def get_terminator(self) -> bytes | int | None: ...
def handle_read(self) -> None: ...
def handle_write(self) -> None: ...
def handle_close(self) -> None: ...