From 5bb11b6964e99b4874fa41dff4c0032435987f8b Mon Sep 17 00:00:00 2001 From: phi Date: Sun, 2 Nov 2025 22:12:04 +0900 Subject: [PATCH] fix: lint error --- src/socketio/async_client.py | 2 +- src/socketio/async_server.py | 2 +- src/socketio/base_server.py | 2 +- src/socketio/client.py | 7 ++++--- src/socketio/server.py | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/socketio/async_client.py b/src/socketio/async_client.py index fc7ce3f..c19c845 100644 --- a/src/socketio/async_client.py +++ b/src/socketio/async_client.py @@ -45,7 +45,7 @@ class AsyncClient(base_client.BaseClient): leave interrupt handling to the calling application. Interrupt handling can only be enabled when the client instance is created in the main thread. - :param serializer_args: A mapping of additional parameters to pass to + :param serializer_args: A mapping of additional parameters to pass to the serializer. The content of this dictionary depends on the selected serialization method. diff --git a/src/socketio/async_server.py b/src/socketio/async_server.py index 9bdfca4..fa22393 100644 --- a/src/socketio/async_server.py +++ b/src/socketio/async_server.py @@ -50,7 +50,7 @@ class AsyncServer(base_server.BaseServer): default is `['/']`, which always accepts connections to the default namespace. Set to `'*'` to accept all namespaces. - :param serializer_args: A mapping of additional parameters to pass to + :param serializer_args: A mapping of additional parameters to pass to the serializer. The content of this dictionary depends on the selected serialization method. :param kwargs: Connection parameters for the underlying Engine.IO server. diff --git a/src/socketio/base_server.py b/src/socketio/base_server.py index 873e969..488ffe1 100644 --- a/src/socketio/base_server.py +++ b/src/socketio/base_server.py @@ -253,7 +253,7 @@ class BaseServer: handler = self.namespace_handlers['*'] args = (namespace, *args) return handler, args - + def _create_packet(self, *args, **kwargs): return self.packet_class(*args, **kwargs, **self.packet_class_args) diff --git a/src/socketio/client.py b/src/socketio/client.py index 7be92cc..29c1f25 100644 --- a/src/socketio/client.py +++ b/src/socketio/client.py @@ -48,7 +48,7 @@ class Client(base_client.BaseClient): leave interrupt handling to the calling application. Interrupt handling can only be enabled when the client instance is created in the main thread. - :param serializer_args: A mapping of additional parameters to pass to + :param serializer_args: A mapping of additional parameters to pass to the serializer. The content of this dictionary depends on the selected serialization method. @@ -237,8 +237,9 @@ class Client(base_client.BaseClient): data = [data] else: data = [] - self._send_packet(self._create_packet(packet.EVENT, namespace=namespace, - data=[event] + data, id=id)) + self._send_packet( + self._create_packet(packet.EVENT, namespace=namespace, + data=[event] + data, id=id)) def send(self, data, namespace=None, callback=None): """Send a message to the server. diff --git a/src/socketio/server.py b/src/socketio/server.py index 1658fa5..7312506 100644 --- a/src/socketio/server.py +++ b/src/socketio/server.py @@ -53,7 +53,7 @@ class Server(base_server.BaseServer): default is `['/']`, which always accepts connections to the default namespace. Set to `'*'` to accept all namespaces. - :param serializer_args: A mapping of additional parameters to pass to + :param serializer_args: A mapping of additional parameters to pass to the serializer. The content of this dictionary depends on the selected serialization method. :param kwargs: Connection parameters for the underlying Engine.IO server.