diff --git a/examples/package_test_tool.py b/examples/package_test_tool.py index 27d9d5219..d740a02f7 100755 --- a/examples/package_test_tool.py +++ b/examples/package_test_tool.py @@ -90,7 +90,7 @@ def callback_data(self, data: bytes, addr: tuple | None = None) -> int: return len(data) def callback_connected(self) -> None: - """Call when connection is succcesfull.""" + """Call when connection is successful.""" def callback_disconnected(self, exc: Exception | None) -> None: """Call when connection is lost.""" diff --git a/pymodbus/server/base.py b/pymodbus/server/base.py index e0eb03bc3..db886ed19 100644 --- a/pymodbus/server/base.py +++ b/pymodbus/server/base.py @@ -88,8 +88,8 @@ async def serve_forever(self, *, background: bool = False): Log.info("Server graceful shutdown.") def callback_connected(self) -> None: - """Call when connection is succcesfull.""" - raise RuntimeError("callback_new_connection should never be called") + """Call when connection is successful.""" + raise RuntimeError("callback_connected should never be called") def callback_disconnected(self, exc: Exception | None) -> None: """Call when connection is lost.""" diff --git a/pymodbus/server/requesthandler.py b/pymodbus/server/requesthandler.py index 783598c6f..b182fc4e3 100644 --- a/pymodbus/server/requesthandler.py +++ b/pymodbus/server/requesthandler.py @@ -9,7 +9,7 @@ from pymodbus.logging import Log from pymodbus.pdu.pdu import ExceptionResponse from pymodbus.transaction import TransactionManager -from pymodbus.transport import CommParams, ModbusProtocol +from pymodbus.transport import CommParams class ServerRequestHandler(TransactionManager): @@ -40,10 +40,6 @@ def __init__(self, owner, trace_packet, trace_pdu, trace_connect): trace_connect, ) - def callback_new_connection(self) -> ModbusProtocol: - """Call when listener receive new connection request.""" - raise RuntimeError("callback_new_connection should never be called") - def callback_disconnected(self, call_exc: Exception | None) -> None: """Call when connection is lost.""" super().callback_disconnected(call_exc) diff --git a/pymodbus/transaction/transaction.py b/pymodbus/transaction/transaction.py index a0c059fdc..912676b8d 100644 --- a/pymodbus/transaction/transaction.py +++ b/pymodbus/transaction/transaction.py @@ -214,7 +214,7 @@ def callback_new_connection(self): """Call when listener receive new connection request.""" def callback_connected(self) -> None: - """Call when connection is succcesfull.""" + """Call when connection is successful.""" self.count_until_disconnect = self.max_until_disconnect self.next_tid = 0 self.trace_connect(True) diff --git a/pymodbus/transport/transport.py b/pymodbus/transport/transport.py index 36750a65a..af3ac8203 100644 --- a/pymodbus/transport/transport.py +++ b/pymodbus/transport/transport.py @@ -361,7 +361,7 @@ def callback_new_connection(self) -> ModbusProtocol: @abstractmethod def callback_connected(self) -> None: - """Call when connection is succcesfull.""" + """Call when connection is successful.""" @abstractmethod def callback_disconnected(self, exc: Exception | None) -> None: diff --git a/test/transport/conftest.py b/test/transport/conftest.py index f57062e6c..9230493b6 100644 --- a/test/transport/conftest.py +++ b/test/transport/conftest.py @@ -22,7 +22,7 @@ def callback_new_connection(self) -> ModbusProtocol: return DummyProtocol(params=self.comm_params, is_server=False) def callback_connected(self) -> None: - """Call when connection is succcesfull.""" + """Call when connection is successful.""" def callback_disconnected(self, exc: Exception | None) -> None: """Call when connection is lost."""