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

[TRIO] Add TRIO105: SyncTrioCall #8490

Merged
merged 4 commits into from
Nov 5, 2023
Merged

Conversation

qdegraaf
Copy link
Contributor

@qdegraaf qdegraaf commented Nov 4, 2023

Summary

Adds TRIO105 from the flake8-trio plugin. The MethodName logic mirrors that of TRIO100 to stay consistent within the plugin.

It is at 95% parity with the exception of upstream also checking for a slightly more complex scenario where a call to start() on a trio.Nursery context should also be immediately awaited. Upstream plugin appears to just check for anything named nursery judging from the relevant issue.

Unsure if we want to do so something similar or, alternatively, if there is some capability in ruff to check for calls made on this context some other way

Test Plan

Added a new fixture, based on the one from upstream plugin

Issue link

Refers: #8451

Copy link
Contributor

github-actions bot commented Nov 4, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Nov 5, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) November 5, 2023 19:47
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.

LGTM! Pulled MethodName into a shared file and implementation. Thanks!

@charliermarsh charliermarsh added the preview Related to preview mode features label Nov 5, 2023
@charliermarsh charliermarsh merged commit 4170ef0 into astral-sh:main Nov 5, 2023
16 checks passed
@qdegraaf qdegraaf deleted the feat/TRIO105 branch November 6, 2023 15:53
This pull request was closed.
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.

2 participants