mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-26 02:08:42 +08:00
Use PEP 570 syntax in third party stubs (#11554)
This commit is contained in:
@@ -47,10 +47,10 @@ class greenlet:
|
||||
def switch(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
@overload
|
||||
def throw(
|
||||
self, __typ: type[BaseException] = ..., __val: BaseException | object = None, __tb: TracebackType | None = None
|
||||
self, typ: type[BaseException] = ..., val: BaseException | object = None, tb: TracebackType | None = None, /
|
||||
) -> Any: ...
|
||||
@overload
|
||||
def throw(self, __typ: BaseException = ..., __val: None = None, __tb: TracebackType | None = None) -> Any: ...
|
||||
def throw(self, typ: BaseException = ..., val: None = None, tb: TracebackType | None = None, /) -> Any: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
# aliases for some module attributes/methods
|
||||
@@ -61,18 +61,18 @@ class greenlet:
|
||||
@staticmethod
|
||||
def gettrace() -> _TraceCallback | None: ...
|
||||
@staticmethod
|
||||
def settrace(__callback: _TraceCallback | None) -> _TraceCallback | None: ...
|
||||
def settrace(callback: _TraceCallback | None, /) -> _TraceCallback | None: ...
|
||||
|
||||
class UnswitchableGreenlet(greenlet): # undocumented
|
||||
force_switch_error: bool
|
||||
force_slp_switch_error: bool
|
||||
|
||||
def enable_optional_cleanup(__enabled: bool) -> None: ...
|
||||
def enable_optional_cleanup(enabled: bool, /) -> None: ...
|
||||
def get_clocks_used_doing_optional_cleanup() -> int: ...
|
||||
def get_pending_cleanup_count() -> int: ...
|
||||
def get_total_main_greenlets() -> int: ...
|
||||
def get_tstate_trash_delete_nesting() -> int: ...
|
||||
def getcurrent() -> greenlet: ...
|
||||
def gettrace() -> _TraceCallback | None: ...
|
||||
def set_thread_local(__key: object, __value: object) -> None: ...
|
||||
def settrace(__callback: _TraceCallback | None) -> _TraceCallback | None: ...
|
||||
def set_thread_local(key: object, value: object, /) -> None: ...
|
||||
def settrace(callback: _TraceCallback | None, /) -> _TraceCallback | None: ...
|
||||
|
||||
Reference in New Issue
Block a user