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] Respect pep8_naming.classmethod-decorators settings when determining if a method is a classmethod in custom-type-var-return-type (PYI019) #13162

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

AlexWaygood
Copy link
Member

Summary

I noticed that PYI019 was using its own routines for determining whether a function was a classmethod or not, when most of our linter rules use ruff_python_semantic::function_type::classify() for this purpose. Using the common method in PYI019 means that this rule will benefit from any bugfixes we make to classify() in the future, and also means that this rule now respects the pep8_naming.classmethod-decorators setting when deciding whether a method is a classmethod or not.

Test Plan

cargo test -p ruff_linter

…when determining if a method is a classmethod in `custom-type-var-return-type` (`PYI019`)
@AlexWaygood AlexWaygood added bug Something isn't working rule Implementing or modifying a lint rule labels Aug 30, 2024
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@AlexWaygood AlexWaygood merged commit 34b4732 into main Aug 30, 2024
20 checks passed
@AlexWaygood AlexWaygood deleted the alex/dunder-new branch August 30, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants