Fix broken window icon, resolve 42 type errors in main_widget#968
Merged
Fix broken window icon, resolve 42 type errors in main_widget#968
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__root__(missedsrc/directory), replaced withICONS_DIRalready used everywhere elsemain_widget.py:central_tabasQTabWidgetfrom init (wasQWidgetplaceholder)hasattrduck-typing withisinstancechecks for pyright narrowingQApplication.instance()isinstanceassertion forself.sender()→QActionAlso reconciled tasks.json: marked 23 completed tasks as done, unblocked 4 downstream tasks.
Test plan
basedpyright src/caliscope/gui/main_widget.py→ 0 errors