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

ruff: enable pep8-naming rules #18144

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

brianschubert
Copy link
Collaborator

The vast majority of mypy's code follows PEP 8 naming conventions. However, we currently don't enforce this in the linter config. I noticed this in a recent PR which included a camelCase name: #18132 (comment).

Ruff has some rules to enforce PEP 8 naming style (pep8-naming). I think it would be a good idea to enable some of these to help contributors catch naming discrepancies before PR review.

We have a few notable exceptions to PEP 8 naming (e.g. functions named to match ast node names), but these are easily accounted for with some config file ignores and handful of # noqa's.

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@hauntsaninja hauntsaninja merged commit 3b63891 into python:master Nov 14, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants