-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
78 lines (70 loc) · 3 KB
/
Copy pathpyproject.toml
File metadata and controls
78 lines (70 loc) · 3 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "custodian"
version = "0.1.0"
description = "Cross-repo audit + maintenance toolkit"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pyyaml>=6",
]
[project.optional-dependencies]
dev = [
"pytest>=8",
"ruff>=0.5",
]
# Tool adapters — install to enable adapter-backed detection
tools = [
"mypy>=1.8",
"vulture>=2.11",
"semgrep>=1.0",
# ty is from Astral (uv install ty); add if using ty adapter
]
[project.scripts]
custodian-audit = "custodian.cli.audit:main"
custodian-doctor = "custodian.cli.doctor:main"
custodian-multi = "custodian.cli.multi:main"
custodian-fix = "custodian.cli.fix:main"
custodian-config = "custodian.cli.config_migrate:main"
custodian-report = "custodian.cli.report:main"
custodian-triage = "custodian.cli.triage:main"
custodian-repograph-governance-gate = "custodian.cli.repograph_governance_gate:main"
custodian = "custodian.cli.main:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
[tool.ruff]
line-length = 100
target-version = "py311"
extend-exclude = ["tests/fixtures"]
[tool.ruff.lint]
# Tool-side replacements for Custodian native detectors deprecated under the
# "use the tool first" principle. See docs/design/detector_disposition_matrix.md.
# Removing any rule re-opens a coverage gap.
extend-select = [
"T201", # C2 — print()
"S101", # C40 — assert in prod
"S110", # C4 — try/except/pass
"S324", # C31 — weak hash
"S602", "S603", # C23 — subprocess shell=True
"BLE001", # C9 — blind Exception
"DTZ001", "DTZ003", "DTZ005", "DTZ006", "DTZ007", # C10 — naive datetime
"G004", # C15 — f-string in logger
"B006", # C38 — mutable default arg
"B028", # C42 — warnings.warn no stacklevel
"PLC1802", # C17 — len(x) == 0
"TRY002", # C20 — raise vanilla Exception
"TRY203", # D9 — useless try/except
"PGH003", # C35 — bare # type: ignore
"RET503", # D8 — implicit return
"N818", # N1 — exception class naming
]
[tool.ruff.lint.per-file-ignores]
# CLI scripts and tools legitimately print and broad-except
"src/custodian/cli/**/*.py" = ["T201", "BLE001", "S603"]
"src/custodian/adapters/**/*.py" = ["S603"]
"tools/**/*.py" = ["T201", "BLE001", "S603"]