-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
55 lines (50 loc) · 1.53 KB
/
pyproject.toml
File metadata and controls
55 lines (50 loc) · 1.53 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
[tool.ruff]
target-version = "py310"
line-length = 120
extend-exclude = ["core/migrations"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
"DJ", # flake8-django
"S", # flake8-bandit (security)
"T20", # flake8-print (no print statements)
]
ignore = [
"S101", # assert is fine in tests
"S105", # hardcoded passwords allowed in tests/settings
"S106", # hardcoded passwords allowed in tests/settings
"DJ001", # null=True on CharField is intentional in some models
"UP045", # Optional[X] vs X | None – keep for 3.9 compat readability
]
[tool.ruff.lint.per-file-ignores]
"core/tests.py" = ["S105", "S106"]
"core/tests/**" = ["S105", "S106"]
"layernexus/settings.py" = ["S105"]
"core/services/orcaslicer.py" = ["SIM105"] # try/float/except pattern is clearer than suppress
"core/services/*.py" = ["S113"] # timeout set via kwargs.setdefault, not missing
"core/services/gcode_thumbnail.py" = ["SIM108"] # if/else is clearer than ternary here
[tool.ruff.lint.isort]
known-first-party = ["core", "layernexus"]
[tool.coverage.run]
source = ["core"]
omit = [
"core/migrations/*",
"core/tests/*",
"core/tests.py",
]
[tool.coverage.report]
fail_under = 55
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.",
]