-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
105 lines (88 loc) Β· 2.71 KB
/
pyproject.toml
File metadata and controls
105 lines (88 loc) Β· 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[tool.ruff]
line-length = 120
unsafe-fixes = true
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"W", # pycodestyle warnings
"Q", # flake8-quotes
"I", # isort (import sorting) - replaces isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"S", # flake8-bandit (security)
"D", # pydocstyle
"ANN", # flake8-annotations
"UP", # pyupgrade
"N", # pep8-naming
"ERA", # eradicate (commented-out code)
"PL", # Pylint
"RUF", # Ruff-specific rules
]
# https://docs.astral.sh/ruff/rules/whitespace-before-punctuation/
# ignore = ["E203"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
preview = false
exclude = [".devcontainer/**"]
[tool.ruff.lint.pydocstyle]
convention = "google"
# FIXME: Broaden ignores post-refactor (2025-12-10)
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = ["S101", "PLR2004", "ANN401", "RUF059", "ARG002", "S106", "S105", "S108", "PTH110", "PTH118", "PTH120", "FBT003", "ARG001", "ARG005", "D104"]
"**/scripts/**" = ["D", "FBT", "BLE001", "TRY", "S6", "PTH", "ANN", "DTZ", "C901", "PLR0912", "PLR0913", "PLR0915", "S101", "TD", "FIX", "INP001", "PLR2004", "S110", "PERF203", "PLW2901", "SIM105", "ERA001", "ARG001"]
"**/*.py" = ["PLC0415"]
[tool.ruff.format]
preview = true
[tool.mypy]
ignore_missing_imports = true
disallow_untyped_defs = true
pretty = true
[tool.flake8]
max-line-length = 120
extend-ignore = ["E203", "E302", "W503", "DUO106", "DUO116", "F841", "E402"]
[tool.pytest.ini_options]
addopts = [
"--durations=0",
"--last-failed",
"--last-failed-no-failures=all",
"--new-first",
"-rfEsxXp",
"-vvv",
]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
[tool.coverage.run]
branch = true
source = ["scripts"]
omit = [
"scripts/__init__.py",
"scripts/*/__init__.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
show_missing = true
fail_under = 28
# =============================================================================
# isort - Import sorting (also handled by ruff with "I" rule)
# =============================================================================
[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B603", "B607", "B404", "B105", "B101"]
# =============================================================================
# yamllint - YAML linting
# =============================================================================
[tool.yamllint]
extends = "relaxed"
[tool.yamllint.rules]
line-length = { max = 120 }