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: https://github.com/python/mypy/pull/18132#discussion_r1836870819.
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.
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: https://github.com/python/mypy/pull/18132#discussion_r1836870819.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.