From 9ded789273adbc7cf7c0aa6ef26f51e3894a743d Mon Sep 17 00:00:00 2001 From: jan iversen Date: Fri, 27 Oct 2023 09:19:31 +0200 Subject: [PATCH] More elegant noop. --- 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: