screen-locker/scripts
Krzysztof Rudnicki dd233b27aa Run the fit check as a module, so it works where nothing is installed
CI caught what this machine could not: the hook died with "No module named
'screen_locker'". The package is pip-installed here (editable, pointing at
this checkout), so running the script by path found it anyway; a fresh
checkout has no install, and `python3 scripts/x.py` puts only `scripts/` on
sys.path. `python3 -m scripts.verify_screen_fits` puts the repo root there
instead, which is the checkout in CI and here alike -- verified in a
throwaway worktree, where the module now resolves to the worktree's own
package rather than the installed one.

The xvfb re-exec runs the same way, with an explicit cwd so the child does
not depend on where the parent was invoked from.

pylint had the same blind spot for the same reason: it infers sys.path from
the files it is handed, so this script resolved its imports only when a
package file happened to be in the same batch -- passing or failing by what
else was staged. An init-hook puts the repo root on the path unconditionally.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BsXnTHyuuCUZsqetTaajcF
2026-08-03 16:34:45 +02:00
..
check_file_length.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
check_flutter_coverage.sh Run the flutter hooks with the git hook's environment stripped 2026-07-26 15:28:52 +02:00
check_requirements_sync.py Add CI-mirror pre-push gate + requirements-sync check 2026-07-11 17:42:45 +02:00
check_silent_failures.py Support multiple workouts per day; fix the dead sync; ban silent failures 2026-07-17 09:22:31 +02:00
ci_mirror.sh Add CI-mirror pre-push gate + requirements-sync check 2026-07-11 17:42:45 +02:00
fix_2026_07_26_sport.py Make the lock overlay's sport selector usable, and focus its form fields 2026-07-26 15:08:08 +02:00
setup_mcp.sh Add read-only MCP server exposing workout/lock status 2026-07-10 21:28:09 +02:00
verify_lock_popup_safety.py Pin gatelock 0.2.1, and stop the popup check passing when it cannot run 2026-07-26 15:18:04 +02:00
verify_screen_fits.py Run the fit check as a module, so it works where nothing is installed 2026-08-03 16:34:45 +02:00