MAINT-21 review: two source scans read the split files too
checks / unit (pull_request) Successful in 31m44s
infra-pin / fresh (pull_request) Successful in 1s

test_safety118's "size rule is gone" and test_validate's "no numeric
maintenance_* fallback" read app/main.py only; the code they guard can now
sit in app/ctl_*.py, where a regression passed unseen. Both read
main_files.source() for main.py now. Tests only; no app change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-11-09 07:15:14 +01:00
co-authored by Claude Opus 5.5
parent 58b6fa35f5
commit 8f0b8477e6
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -1028,6 +1028,11 @@ check("...and the drain SET is not clamped either, so the twin key the card "
_srcs = {name: open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
"app", name), encoding="utf-8").read()
for name in ("main.py", "validate.py", "maintenance.py")}
# MAINT-21: main.py stands for itself and the files split from it.
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)),
"tools"))
import main_files # noqa: E402
_srcs["main.py"] = main_files.source()
_literals = {name: re.findall(
r'"(maintenance_[a-z_]+)"\s*,\s*(-?\d+(?:\.\d+)?)\s*[,)]', src)
for name, src in _srcs.items()}