Skip to content

Fix broken window icon, resolve 42 type errors in main_widget#968

Merged
mprib merged 4 commits intomainfrom
housekeeping/type-cleanup
Mar 17, 2026
Merged

Fix broken window icon, resolve 42 type errors in main_widget#968
mprib merged 4 commits intomainfrom
housekeeping/type-cleanup

Conversation

@mprib
Copy link
Copy Markdown
Owner

@mprib mprib commented Mar 17, 2026

Summary

  • Fixed window icon path that used __root__ (missed src/ directory), replaced with ICONS_DIR already used everywhere else
  • Resolved all 42 basedpyright errors in main_widget.py:
    • Typed central_tab as QTabWidget from init (was QWidget placeholder)
    • Replaced hasattr duck-typing with isinstance checks for pyright narrowing
    • Added null guard for QApplication.instance()
    • Added isinstance assertion for self.sender()QAction

Also reconciled tasks.json: marked 23 completed tasks as done, unblocked 4 downstream tasks.

Test plan

  • basedpyright src/caliscope/gui/main_widget.py → 0 errors
  • Launch app, verify window icon appears
  • Verify tab lifecycle (enable/disable/cleanup) still works

mprib added 4 commits March 17, 2026 08:04
The window icon used __root__ which resolved to the repo root, missing
the src/ directory. Replaced with ICONS_DIR (already used everywhere
else). Also typed central_tab as QTabWidget from init and replaced
hasattr duck-typing with isinstance checks for pyright narrowing.
TaskManager.submit() was calling thread.start() before returning the
handle, so callers connecting signals after submit() could miss signals
from fast-completing workers. On macOS CI, the synthetic pipeline fails
instantly (all linkages killed), finishing before .connect() runs —
leaving both result and error holders empty.

Add auto_start=False option to submit() and start_task() method so
callers can wire signals before the thread begins.
Change auto_start default to False so the safe pattern (connect signals
before starting thread) is the default. Migrate all 10 call sites to
use submit() → connect() → start_task(). Simplify task manager tests
by removing threading.Event workarounds that were papering over the
same race condition.
Aligns with aniposelib/Pose2Sim convention which expects the fisheye
field per camera section.
@mprib mprib merged commit 55a8a66 into main Mar 17, 2026
3 checks passed
@mprib mprib deleted the housekeeping/type-cleanup branch March 17, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant