diff --git a/examples/server_updating.py b/examples/server_updating.py index cf7de50d3..dc45b3d8e 100755 --- a/examples/server_updating.py +++ b/examples/server_updating.py @@ -42,10 +42,9 @@ async def updating_task(context): - """Run every so often, + """Run every so often and update live values of the context. - and updates live values of the context. It should be noted - that there is a lrace condition for the update. + It should be noted that there is a race condition for the update. """ _logger.debug("updating the context") fc_as_hex = 3 @@ -77,7 +76,7 @@ def setup_updating_server(cmdline=None): async def run_updating_server(args): """Start updater task and async server.""" - asyncio.create_task(updating_task(args.context)) + asyncio.create_task(updating_task(args.context)) # noqa: RUF006 await run_async_server(args) diff --git a/ruff.toml b/ruff.toml index 7903d05ae..c3afe50b4 100644 --- a/ruff.toml +++ b/ruff.toml @@ -25,6 +25,7 @@ select = [ "SIM212", "SIM300", "SIM401", + "RUF", ] [pydocstyle] convention = "pep257" diff --git a/test/test_unix_socket.py b/test/test_unix_socket.py index 57c2125bf..d41c1ab04 100755 --- a/test/test_unix_socket.py +++ b/test/test_unix_socket.py @@ -31,7 +31,7 @@ async def _helper_server(path_addon): context = ModbusSlaveContext( di=datablock, co=datablock, hr=datablock, ir=datablock, slave=1 ) - asyncio.create_task( + asyncio.create_task( # noqa: RUF006 StartAsyncUnixServer( context=ModbusServerContext(slaves=context, single=True), path=PATH + path_addon,