mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-24 18:48:46 +08:00
Improve __enter__ & constructor methods (#7114)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import threading
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Iterator, Protocol
|
||||
from typing_extensions import Literal
|
||||
@@ -22,7 +23,7 @@ class Spinner(object):
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def init_spin(self) -> None: ...
|
||||
def __enter__(self) -> Spinner: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> Literal[False]: ...
|
||||
|
||||
Reference in New Issue
Block a user