mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 21:27:02 +01:00
DisplayMixin in _display.py takes the methods that reach widgets only through self._widgets: apply, _play, _verdict, on_undo, on_quit, drain, refresh, tick and attach_player. Widget construction stays in ui.py on purpose. test_ui.py fakes the toolkit with patch.object(ui, "tk", fake), so moving _build out makes 22 tests error with "module ui does not have the attribute 'tk'". An earlier attempt did that and was reverted rather than touching the tests. Also dropped the four _key_* adapters; each only discarded Tk's event argument before forwarding, so _bind_keys binds lambdas directly now. One thing worth knowing for the next split: ruff's TC001 is NOT suppressed by __all__ the way F401 is. Moving Callbacks to its own module and re-exporting it left a TYPE_CHECKING-only import that lints clean and raises AttributeError at runtime -- cli.py constructs ui.Callbacks. Reverted; it stays defined in ui.py. ui.py 398 -> 242, _display.py 179. 277 tests pass, both files 100% covered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| android_ui | ||
| app_icons | ||
| archwiki_rag | ||
| artgate | ||
| billsplit_coverage | ||
| brother_printer | ||
| code_tutor | ||
| focus_policy | ||
| live_calc | ||
| morning_routine | ||
| random_jpg | ||
| shared | ||
| syncyomi_guard | ||
| tests | ||
| token_audit | ||
| wsg_grabber | ||
| __init__.py | ||
| .gitignore | ||
| conftest.py | ||