Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ruff-specific rules #1481

Merged
merged 8 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions examples/server_updating.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)


Expand Down
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ select = [
"SIM212",
"SIM300",
"SIM401",
"RUF",
]
[pydocstyle]
convention = "pep257"
2 changes: 1 addition & 1 deletion test/test_unix_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down