Small cleanups: duplicate QTimer import + set_check_box_state hygiene#292
Open
razinkele wants to merge 2 commits into
Open
Small cleanups: duplicate QTimer import + set_check_box_state hygiene#292razinkele wants to merge 2 commits into
razinkele wants to merge 2 commits into
Conversation
`QTimer` appeared twice in the same `from PySide6.QtCore import ...` line, a likely artifact of the monolithic-to-modular extraction. Python silently deduplicates so there is no behavior change, but pyflakes flagged it. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Three small fixes to one function:
- Remove unused `sender = self.sender()` local (assigned but never used)
- Remove leftover `print("test " + _property)` debug line
- Narrow bare `except:` to `except AttributeError:` — matches the
exception `re.search(...).group(1)` actually raises when there is no
match, and stops swallowing unrelated errors (KeyboardInterrupt etc.)
No behavior change for normal control flow.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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
Two small no-behavior-change cleanups surfaced by pyflakes on the post-restructure source tree:
src/main_window.py— Remove the duplicateQTimerat the end of thefrom PySide6.QtCore import …line. Python silently dedupes, so no runtime impact, but the duplicate is a leftover from the monolithic-to-modular extraction.src/profile_settings_window.py(set_check_box_state) — Three small fixes to one function:sender = self.sender()(assigned but never used).print("test " + _property)debug line.except:toexcept AttributeError:— the exception thatre.search(...).group(1)actually raises when there is no match. The bare form would also swallowKeyboardInterrupt,SystemExit, and unrelated bugs.Test plan
src/compile cleanly under Python 3.12 (python3 -m compileall -q src/)pyflakes src/main_window.py src/profile_settings_window.py)AttributeErrorchange preserves the existing fall-through behavior for the documented checkBox/groupBox name patterns; only out-of-band exceptions (e.g.KeyboardInterrupt) are no longer suppressed.