mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use _typeshed.Self with __enter__ (#5723)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz> Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from typing import Any, Callable, ContextManager, Generic, Iterable, Iterator, List, Mapping, Optional, TypeVar
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -77,7 +78,7 @@ class Pool(ContextManager[Pool]):
|
||||
def close(self) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
def join(self) -> None: ...
|
||||
def __enter__(self: _PT) -> _PT: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
|
||||
class ThreadPool(Pool, ContextManager[ThreadPool]):
|
||||
def __init__(
|
||||
|
||||
Reference in New Issue
Block a user