-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add TRIO110 rule #8537
Add TRIO110 rule #8537
Conversation
|
b4159f7
to
9683375
Compare
crates/ruff_linter/src/rules/flake8_trio/rules/unneeded_sleep.rs
Outdated
Show resolved
Hide resolved
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.
Nice, thank you!
} | ||
} | ||
|
||
pub(crate) fn unneeded_sleep(checker: &mut Checker, while_stmt: &ast::StmtWhile) { |
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.
In general, we prefer passing in the typed node (ast::StmtWhile
instead of the individual properties of it, like body
). That way, users can't accidentally pass an AST node of the wrong type.
fa98de6
to
cdd9910
Compare
Summary
Adds TRIO110 from the flake8-trio plugin.
Relates to: #8451