Use PEP 570 syntax in third party stubs (#11554)

This commit is contained in:
Shantanu
2024-03-10 06:11:43 -07:00
committed by GitHub
parent f94bbfbcc4
commit 88fa182253
97 changed files with 625 additions and 632 deletions

View File

@@ -54,7 +54,7 @@ class SocketIO:
def on_error_default(self, exception_handler: _ExceptionHandler[_R_co]) -> _ExceptionHandler[_R_co]: ...
def on_event(self, message: str, handler: _Handler[[Incomplete], object], namespace: str | None = None) -> None: ...
@overload
def event(self, __event_handler: _Handler[_P, _R_co]) -> _Handler[_P, _R_co]: ...
def event(self, event_handler: _Handler[_P, _R_co], /) -> _Handler[_P, _R_co]: ...
@overload
def event(self, namespace: str | None = None, *args, **kwargs) -> _HandlerDecorator: ...
def on_namespace(self, namespace_handler: Namespace) -> None: ...