Enable Ruff N (pep8-naming) on non-stubs (#13327)

This commit is contained in:
Avasam
2025-01-02 05:22:40 -05:00
committed by GitHub
parent 67568b5e19
commit 73ce98b5a3
5 changed files with 17 additions and 13 deletions

View File

@@ -41,6 +41,7 @@ select = [
"B", # flake8-bugbear
"FA", # flake8-future-annotations
"I", # isort
"N", # pep8-naming
"PGH", # pygrep-hooks
"RUF", # Ruff-specific and unused-noqa
"UP", # pyupgrade
@@ -118,6 +119,9 @@ ignore = [
# See https://github.com/python/typeshed/pull/13108
"RUF022",
"RUF023",
# Most pep8-naming rules don't apply for third-party stubs like typeshed.
# N811 to N814 could apply, but we often use them to disambiguate a name whilst making it look like a more common one
"N8",
# Rules that are out of the control of stub authors:
"F403", # `from . import *` used; unable to detect undefined names
# Stubs can sometimes re-export entire modules.