Enable Ruff PLW (Pylint Warning) (#13749)

This commit is contained in:
Avasam
2025-04-01 15:12:15 +02:00
committed by GitHub
parent df1206f3cb
commit eafa274f1b
14 changed files with 43 additions and 37 deletions
+6 -4
View File
@@ -53,9 +53,7 @@ select = [
"I", # isort
"N", # pep8-naming
"PGH", # pygrep-hooks
"PLC", # Pylint Convention
"PLE", # Pylint Error
"PLR", # Pylint Refactor
"PL", # Pylint
"RUF", # Ruff-specific and unused-noqa
"TRY", # tryceratops
"UP", # pyupgrade
@@ -186,15 +184,19 @@ ignore = [
# Rules that are out of the control of stub authors:
###
# Names in stubs should match the implementation, even if it's ambiguous.
# https://github.com/astral-sh/ruff/issues/15293
"A", # flake8-builtins
"F403", # `from . import *` used; unable to detect undefined names
# Stubs can sometimes re-export entire modules.
# Issues with using a star-imported name will be caught by type-checkers.
"F403", # `from . import *` used; unable to detect undefined names
"F405", # may be undefined, or defined from star imports
# 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", # pep8-naming
# Stubs are allowed to use private variables (pyright's reportPrivateUsage is also disabled)
"PLC2701", # Private name import from external module
# Names in stubs should match implementation
"PLW0211", # First argument of a static method should not be named `{argument_name}`
]
"lib/ts_utils/**" = [
# Doesn't affect stubs. The only re-exports we have should be in our local lib ts_utils