mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use _typeshed.Self with __enter__ (#5717)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import FileDescriptorLike
|
||||
from _typeshed import FileDescriptorLike, Self
|
||||
from types import TracebackType
|
||||
from typing import Any, Iterable, List, Optional, Tuple, Type
|
||||
|
||||
@@ -101,7 +101,7 @@ if sys.platform != "linux" and sys.platform != "win32":
|
||||
if sys.platform == "linux":
|
||||
class epoll(object):
|
||||
def __init__(self, sizehint: int = ..., flags: int = ...) -> None: ...
|
||||
def __enter__(self) -> epoll: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: Optional[Type[BaseException]] = ...,
|
||||
|
||||
Reference in New Issue
Block a user