From 5d1b59f4f5f20f05e58254ebbaa8d1fcab4ccdc4 Mon Sep 17 00:00:00 2001 From: jan iversen Date: Fri, 27 Oct 2023 09:34:34 +0200 Subject: [PATCH] More elegant noop. (#1859) --- pymodbus/transport/transport.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pymodbus/transport/transport.py b/pymodbus/transport/transport.py index 51fd99e81..97a0b3a06 100644 --- a/pymodbus/transport/transport.py +++ b/pymodbus/transport/transport.py @@ -159,11 +159,7 @@ def __init__( self.transport: asyncio.BaseTransport = None self.loop: asyncio.AbstractEventLoop = None self.recv_buffer: bytes = b"" - - async def _noop(): - ... - - self.call_create: Callable[[], Coroutine[Any, Any, Any]] = _noop + self.call_create: Callable[[], Coroutine[Any, Any, Any]] = lambda: None if self.is_server: self.active_connections: dict[str, ModbusProtocol] = {} else: