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,7 @@
import sys
from _typeshed import FileDescriptor, FileDescriptorLike, Self
from abc import ABCMeta, abstractmethod
from typing import Any, List, Mapping, NamedTuple, Optional, Tuple
from typing import Any, List, Mapping, NamedTuple, Tuple
_EventMask = int
@@ -21,7 +21,7 @@ class BaseSelector(metaclass=ABCMeta):
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
def modify(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
@abstractmethod
def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def select(self, timeout: float | None = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def close(self) -> None: ...
def get_key(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
@abstractmethod
@@ -32,14 +32,14 @@ class BaseSelector(metaclass=ABCMeta):
class SelectSelector(BaseSelector):
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def select(self, timeout: float | None = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
if sys.platform != "win32":
class PollSelector(BaseSelector):
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def select(self, timeout: float | None = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
if sys.platform == "linux":
@@ -47,25 +47,25 @@ if sys.platform == "linux":
def fileno(self) -> int: ...
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def select(self, timeout: float | None = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
class DevpollSelector(BaseSelector):
def fileno(self) -> int: ...
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def select(self, timeout: float | None = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
class KqueueSelector(BaseSelector):
def fileno(self) -> int: ...
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def select(self, timeout: float | None = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
class DefaultSelector(BaseSelector):
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = ...) -> SelectorKey: ...
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
def select(self, timeout: Optional[float] = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def select(self, timeout: float | None = ...) -> List[Tuple[SelectorKey, _EventMask]]: ...
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...