Skip to content

[TRIO] Add TRIO105: SyncTrioCall#8490

Merged
charliermarsh merged 4 commits intoastral-sh:mainfrom
qdegraaf:feat/TRIO105
Nov 5, 2023
Merged

[TRIO] Add TRIO105: SyncTrioCall#8490
charliermarsh merged 4 commits intoastral-sh:mainfrom
qdegraaf:feat/TRIO105

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

@github-actions
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
@qdegraaf qdegraaf deleted the feat/TRIO105 branch November 6, 2023 15:53
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