Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
52 lines (48 loc) · 2.09 KB
/
Copy pathpyproject.toml
File metadata and controls
52 lines (48 loc) · 2.09 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
[project]
name = "wikivisage"
version = "0.10.0"
requires-python = ">=3.11"
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"S", # flake8-bandit (security)
]
ignore = [
"E501", # line too long (handled by formatter)
"E402", # module level import not at top — intentional (load_dotenv before imports)
"S101", # assert used (needed in tests)
"S105", # possible hardcoded password — false positives on URL constants and test fixtures
"S110", # try-except-pass — intentional for connection cleanup and non-critical ops
"S112", # try-except-continue — intentional in worker queue polling
"S201", # debug=True in Flask — only in __main__ dev block
"S311", # random.choice — not crypto, just shuffling images for classification
"S324", # md5 — required by Commons thumbnail URL scheme
"S603", # subprocess call without shell=True check — worker uses subprocess intentionally
"S607", # starting process with partial path
"S608", # SQL injection — false positives, we build placeholder lists not values
"S104", # binding to all interfaces — only in __main__ dev block
"B904", # raise from — would be noisy to fix across pool/worker error handling
"B905", # zip without strict=
"SIM102", # nested if — sometimes more readable as separate conditions
"SIM105", # contextlib.suppress — try/except/pass is clearer for our patterns
"SIM108", # ternary operator — multi-line if/else is clearer in test fixtures
"SIM117", # multiple with statements — nested with is clearer for our DB patterns
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S105", "S106", "S314"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
markers = [
"integration: tests requiring a local MariaDB (Docker)",
"contract: tests requiring a running face service (Docker)",
]