KEMBAR78
ruff: enable pep8-naming rules by brianschubert · Pull Request #18144 · python/mypy · GitHub
Skip to content

Conversation

@brianschubert
Copy link
Member

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.

@github-actions
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