/
Art86
/
DefectDojo-DevSecOps
Обзор
Документация
Войти
/
Art86
/
DefectDojo-DevSecOps
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
ruff.toml
138 строк
4 KB
valentijnscholten
reimport: match findings in batches (#13889)
19 дек 2025, 19:59
19 дек 2025, 19:59
48d7306
Код
Авторство
О чём код?
# Always generate Python 3.13-compatible code. target-version = "py313" # Same as Black. line-length = 120 exclude = [ ".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv", # Not for the dojo specific stuff "dojo/db_migrations" ] [lint] select = [ "AIR", "FAST", "YTT", "ASYNC", "S1", "S2", "S302", "S303", "S304", "S305", "S306", "S307", "S31", "S32", "S401", "S402", "S406", "S407", "S408", "S409", "S41", "S5", "S601", "S602", "S604", "S605", "S606", "S607", "S609", "S61", "S7", "FBT", "B00", "B01", "B020", "B021", "B022", "B023", "B025", "B027", "B028", "B029", "B03", "B901", "B903", "B905", "B911", "A", "COM", "C4", "DTZ003", "DTZ004", "DTZ012", "DTZ901", "T10", "DJ003", "DJ01", "EM", "EXE", "FIX", "FA", "INT", "ISC", "ICN", "LOG", "G001", "G002", "G01", "G1", "G2", "INP", "PIE", "T20", "PYI", "PT", "Q", "RSE", "RET", "SIM", "SLOT", "TID", "TD001", "TD004", "TD005", "TD007", "TC", "ARG003", "ARG004", "ARG005", "PTH", "FLY", "I", "C90", "NPY", "PD", "N803", "N804", "N805", "N811", "N812", "N813", "N814", "N817", "N818", "N999", "PERF1", "PERF2", "PERF401", "PERF403", "E", "W", "DOC202", "DOC403", "DOC502", "D2", "D3", "D402", "D403", "D405", "D406", "D407", "D408", "D409", "D410", "D411", "D412", "D413", "D414", "D416", "F", "PGH", "PLC", "PLE", "PLR01", "PLR02", "PLR04", "PLR0915", "PLR1711", "PLR1704", "PLR1714", "PLR1716", "PLR172", "PLR173", "PLR2044", "PLR5", "PLR6104", "PLR6201", "PLW", "UP", "FURB", "RUF", "TRY003", "TRY004", "TRY2", "TRY300", "TRY401", ] ignore = [ "E501", "E722", "SIM102", "RUF012", "RUF015", "D205", "FIX002", # TODOs need some love but we will probably not get of them "D211", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible. "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. "PT009", # We are using a different style of tests (official Django tests), so it does not make sense to try to fix it "PT027", # Same ^ ] # Allow autofix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] unfixable = [] preview = true [lint.per-file-ignores] "unittests/**" = [ "S105", # hardcoded passwords in tests are fine "S108", # tmp paths mentioned in tests are fine ] "dojo/filters.py" = [ "A003", # ruff upgrade to 0.13.3 ] "scripts/update_performance_test_counts.py" = [ "S603", # subprocess.run without shell=True is safe for this script "S604", # subprocess.run without shell=True is safe for this script "S605", # subprocess.run without shell=True is safe for this script "S606", # subprocess.run without shell=True is safe for this script "S607", # subprocess.run without shell=True is safe for this script "T201", # print statements are fine for console output scripts "EXE001", # git won't commit the executable flag I don't know why ] [lint.flake8-boolean-trap] extend-allowed-calls = ["dojo.utils.get_system_setting"] [lint.pylint] max-statements = 234 [lint.mccabe] max-complexity = 70 # value is far from perfect (recommended default is 10). But we will try to decrease it over the time.