MAINT-21 review: two source scans read the split files too
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:
co-authored by
Claude Opus 5.5
parent
58b6fa35f5
commit
8f0b8477e6
@@ -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()}
|
||||
|
||||
Reference in New Issue
Block a user