Skip to content

[pylint] - Allow __new__ methods to have cls as their first argument even if decorated with @staticmethod for bad-staticmethod-argument (PLW0211)#12958

Merged
AlexWaygood merged 1 commit intoastral-sh:mainfrom
diceroll123:fix-plw0211-for-dunder-new
Aug 18, 2024

Conversation

@diceroll123
Copy link
Copy Markdown
Contributor

Summary

Fixes #12930

Test Plan

cargo test

@github-actions
Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks!

@AlexWaygood AlexWaygood changed the title [pylint] - fix __new__(cls, ...) for bad-staticmethod-argument (PLW0211) [pylint] - Allow __new__ methods to have cls as their first argument even if decorated with @staticmethod for bad-staticmethod-argument (PLW0211) Aug 18, 2024
@AlexWaygood AlexWaygood merged commit 81a2220 into astral-sh:main Aug 18, 2024
@dhruvmanila dhruvmanila added the bug Something isn't working label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PLW0211: @staticmethod ; def __new__(cls, ...) disagrees with the Python docs

3 participants