-
Notifications
You must be signed in to change notification settings - Fork 17
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
Use Ruff for linting #289
Use Ruff for linting #289
Conversation
32ecbe2
to
4150816
Compare
# XXX: can return a reference and gracefully use task to cancel itself when the upper call stack fails | ||
asyncio.ensure_future(proc.step_until_terminated()) # noqa: RUF006 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter complain is the reference to the coroutine is not returned. I think the standard way is to use the task to do graceful shutdown.
I'll further investigate on it, what I think is the returned reference to the task returned to the function where it is called (ProcessLauncher
) and before this task get run it can be cancelled without other exception from the event loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you think it is better to not put dev notes in the src code. @agoscinski
0bb21a8
to
d433143
Compare
I move the fix for passing 3.12 tests to #292 so this PR only contains the changes recommended from ruff. It is ready to be review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @unkcpz
The ruff pre-commit configs are mainly get from
aiida-core
.For the linter complain in tests, I simply add
# noqa
to silent those.test
folder totests