mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import sys
|
||||
from _typeshed import FileDescriptor, FileDescriptorLike, Self, Unused
|
||||
from _typeshed import FileDescriptor, FileDescriptorLike, Unused
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Mapping
|
||||
from typing import Any, NamedTuple
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
_EventMask: TypeAlias = int
|
||||
|
||||
@@ -28,7 +28,7 @@ class BaseSelector(metaclass=ABCMeta):
|
||||
def get_key(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
|
||||
@abstractmethod
|
||||
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
|
||||
class SelectSelector(BaseSelector):
|
||||
|
||||
Reference in New Issue
Block a user