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

Add TRIO110 rule #8537

Merged
merged 5 commits into from
Nov 7, 2023
Merged

Conversation

karpetrosyan
Copy link
Contributor

@karpetrosyan karpetrosyan commented Nov 7, 2023

Summary

Adds TRIO110 from the flake8-trio plugin.
Relates to: #8451

Copy link
Contributor

github-actions bot commented Nov 7, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@charliermarsh charliermarsh left a 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) {
Copy link
Member

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.

@charliermarsh charliermarsh force-pushed the add-trio-110-suppor branch 4 times, most recently from fa98de6 to cdd9910 Compare November 7, 2023 21:19
@charliermarsh charliermarsh enabled auto-merge (squash) November 7, 2023 21:21
@charliermarsh charliermarsh merged commit 0126f74 into astral-sh:main Nov 7, 2023
16 checks passed
@charliermarsh charliermarsh added rule Implementing or modifying a lint rule preview Related to preview mode features labels Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants