node/pyproject.toml
Rich Trott bc8c39bff8
tools: disable unneeded rule ignoring in Python linting
Removing PLC1901 and RUF100 from the list of Python lint rules to ignore
does not result in any errors. Keeping the ignore list as short as
possible seems like a good idea, so this change removes them from the
ignore list.

PR-URL: https://github.com/nodejs/node/pull/56429
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-03-06 13:38:06 +01:00

51 lines
1.1 KiB
TOML

[tool.ruff]
exclude = [
"deps",
"tools/cpplint.py",
"tools/gyp",
"tools/inspector_protocol",
"tools/node_modules",
]
line-length = 172
target-version = "py37"
[tool.ruff.lint]
select = [
"C90", # McCabe cyclomatic complexity
"E", # pycodestyle
"F", # Pyflakes
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"PLC", # Pylint conventions
"PLE", # Pylint errors
"PLR09", # Pylint refactoring: max-args, max-branches, max returns, max-statements
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"E401",
"E402",
"E7",
"RUF005",
]
[tool.ruff.lint.mccabe]
max-complexity = 100
[tool.ruff.lint.per-file-ignores]
"tools/checkimports.py" = ["W605"]
"tools/gyp/pylib/gyp/xcodeproj_file.py" = ["PLE0101"]
"tools/icu/shrink-icu-src.py" = ["W605"]
"tools/mkssldef.py" = ["W605"]
[tool.ruff.lint.pylint]
max-args = 12
max-branches = 110
max-returns = 12
max-statements = 289