You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Load a Hyphenated Sibling Check From One Shared Helper #532
Three files in checks/ each define the same five-line helper, which loads a sibling script by path because a hyphenated file name cannot be imported by name:
checks/fuzz-media-parsers.py, load
checks/tests/test_check_media_metadata.py, load
checks/check-csp.py, load_sibling, the third copy, which the CSP gate added to reuse check-url-parity.py's site_origin
A defect class seen a second time gets one primitive, per GOVERNANCE.md "Design Before Code". Each copy is the import bootstrap itself, so none can be reused from the others. The consolidation is a small importable module in checks/, such as checks/sibling.py, that all three import by name. A script run as checks/<name>.py has checks/ on its path, and the test suite runs from checks/, so both reach it.
Done
One definition, all three sites on it, and ruff, mypy, and the suite passing under checks/.
Activity