mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add DefaultSelector.fileno on platforms where it exists (#10820)
This commit is contained in:
@@ -66,8 +66,13 @@ class KqueueSelector(BaseSelector):
|
||||
def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, _EventMask]]: ...
|
||||
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
|
||||
|
||||
# Not a real class at runtime, it is just a conditional alias to other real selectors.
|
||||
# The runtime logic is more fine-grained than a `sys.platform` check;
|
||||
# not really expressible in the stubs
|
||||
class DefaultSelector(BaseSelector):
|
||||
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = None) -> SelectorKey: ...
|
||||
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
|
||||
def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, _EventMask]]: ...
|
||||
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
|
||||
if sys.platform != "win32":
|
||||
def fileno(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user