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

[flake8-pyi] Implement PYI066 #11541

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

tusharsadhwani
Copy link
Contributor

@tusharsadhwani tusharsadhwani commented May 25, 2024

Summary

  • Implements Y066 from flake8-pyi as PYI066
  • Fixes PYI006 not being raised for elif clauses. This would have conflicted with PYI006's implementation, so decided to do it in the same PR.

Test Plan

cargo test / cargo insta review

///
/// if sys.version_info < (3, 10):
///
/// def read_data(x, *, preserve_order=True):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this formatting is the best, but the mkdocs check is failing if I change this in any way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #11568 to track this; I've also bumped into this in the past :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to revert the last commit to format it correctly as needed.

Copy link
Contributor

github-actions bot commented May 25, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh
Copy link
Member

I can merge this one too.

@charliermarsh charliermarsh self-assigned this May 28, 2024
@charliermarsh charliermarsh added rule Implementing or modifying a lint rule preview Related to preview mode features labels May 28, 2024
@charliermarsh charliermarsh changed the title [flake8-pyi] Implement PYI066, fix PYI006 [flake8-pyi] Implement PYI066 May 29, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) May 29, 2024 00:26
@charliermarsh charliermarsh merged commit 531ae52 into astral-sh:main May 29, 2024
17 checks passed
@charliermarsh
Copy link
Member

Thanks @tusharsadhwani!

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.

3 participants