-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TRIO
] Add TRIO115
: TrioZeroSleepCall
#8486
Conversation
} | ||
} | ||
Expr::Name(ast::ExprName { id, .. }) => { | ||
let scope = checker.semantic().current_scope(); |
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.
I couldn't find a more compact way to do this yet. In case there is one somewhere in the repo already, happy to hear about it and refactor this.
/// Checks for calls of `trio.sleep(0)` and suggests replacement with `trio.lowlevel.checkpoint()` | ||
/// | ||
/// ## Why is this bad? | ||
/// Although equivalent to `trio.sleep(0)`, a call to `trio.lowlevel.checkpoint()` is more |
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.
Interpreted from upstream plugin, couldn't find additional info in docs or PRs on the reason. All input is welcome
|
Summary
Adds
TRIO115
from the flake8-trio plugin.Test Plan
Added a new fixture, based on the one from upstream plugin
Issue link
Relates to: #8451