Skip to content

Commit c14ca8f

Browse files
committed
fix: errors
1 parent d054951 commit c14ca8f

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/socketio-stubs/base_client.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ from socketio._types import (
1313
ClientConnectErrorHandler,
1414
ClientConnectHandler,
1515
ClientDisconnectHandler,
16+
ClientDisconnectLegacyHandler,
1617
EventHandler,
1718
JsonModule,
1819
SerializerType,
@@ -88,7 +89,7 @@ class BaseClient(Generic[_IsAsyncio, _T_co, _T_namespace]):
8889
namespace: str | None = ...,
8990
) -> Callable[[H], H]: ...
9091
@overload
91-
def on[H: ClientDisconnectHandler](
92+
def on[H: ClientDisconnectHandler | ClientDisconnectLegacyHandler](
9293
self,
9394
event: Literal["disconnect"],
9495
handler: None = ...,

src/socketio-stubs/base_server.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ from socketio._types import (
1313
JsonModule,
1414
SerializerType,
1515
ServerConnectHandler,
16+
ServerConnectHandlerWithData,
1617
ServerDisconnectHandler,
18+
ServerDisconnectLegacyHandler,
1719
SyncAsyncModeType,
1820
TransportType,
1921
)
@@ -55,14 +57,14 @@ class BaseServer(Generic[_IsAsyncio, _T_co]):
5557
) -> None: ...
5658
def is_asyncio_based(self) -> _IsAsyncio: ...
5759
@overload
58-
def on[H: ServerConnectHandler](
60+
def on[H: ServerConnectHandler | ServerConnectHandlerWithData](
5961
self,
6062
event: Literal["connect"],
6163
handler: None = ...,
6264
namespace: str | None = ...,
6365
) -> Callable[[H], H]: ...
6466
@overload
65-
def on[H: ServerDisconnectHandler](
67+
def on[H: ServerDisconnectHandler | ServerDisconnectLegacyHandler](
6668
self,
6769
event: Literal["disconnect"],
6870
handler: None = ...,

0 commit comments

Comments
 (0)