glances/pyproject.toml

68 lines
1.6 KiB
TOML
Raw Normal View History

2023-05-01 11:12:09 +03:00
[tool.ruff]
2024-05-16 15:01:42 +03:00
line-length = 120
target-version = "py38"
[tool.ruff.format]
quote-style = "preserve"
[tool.ruff.lint]
2023-05-01 11:12:09 +03:00
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
2024-05-16 23:53:53 +03:00
select = [
2024-05-17 01:47:33 +03:00
# "A",
# "B",
# "S",
2024-05-17 00:33:16 +03:00
"C90", # mccabe
2024-05-16 23:53:53 +03:00
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"N", # pep8-naming
2024-05-16 23:53:53 +03:00
"W", # pycodestyle
2024-05-17 00:35:33 +03:00
"UP", # pyupgrde
2024-05-17 00:58:11 +03:00
"C4", # flake8-comprehensions
2024-05-17 00:01:54 +03:00
"RET", # flake8-return
2024-05-17 01:47:33 +03:00
# "PL",
2024-05-16 23:53:53 +03:00
# "FBT", # flake8-boolean-trap
# "RUF", # Ruff-specific rules
# "PERF", # Perflint
]
ignore = ["N801", "N802", "N803", "N805", "N806", "N807", "N811", "N812", "N813", "N814", "N815", "N816", "N817", "N818"]
2023-05-01 11:12:09 +03:00
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"venv-dev",
"venv-min",
2024-05-16 15:01:42 +03:00
"docs",
"test-data",
2024-05-16 15:01:42 +03:00
"./glances/outputs/static/*"
2023-05-01 11:12:09 +03:00
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
2024-05-16 15:01:42 +03:00
[tool.ruff.lint.mccabe]
2023-05-01 11:12:09 +03:00
# Unlike Flake8, default to a complexity level of 10.
2024-05-17 00:33:16 +03:00
max-complexity = 21