chore: silence empty-except CodeQL notes + document Flatpak divergence#61
Merged
Merged
Conversation
Two unrelated cleanup tasks bundled together because both are pure documentation/style — no behavioural changes. B. Silence 9 py/empty-except CodeQL notes ----------------------------------------- Convert defensive try/except: pass blocks to the idiomatic Python form `with contextlib.suppress(...):`. Locations: - installer.py:842 (splash destroy) - app/tools/convert.py:301 (DOCX image embed) - app/utils.py:497,514,533,536 (best-effort temp-file unlinks) - app/window.py:667 (tool-usage config write) - app/window.py:1156 (worker wait during shutdown) - app/window.py:1166 (update-thread quit during shutdown) contextlib.suppress reads exactly the same at runtime but is the canonical "I deliberately want to ignore failures here" idiom, which CodeQL doesn't flag. Each location is intentional defensive code — adding real logging would only add noise. C. Document the Flatpak divergence ---------------------------------- `flatpak/requirements-pinned.txt` is missing 5 packages that were added to root `requirements.txt` in v1.12.0+ (cryptography, python- pptx, openpyxl, beautifulsoup4, ebooklib). A Flatpak built from the current files would have PDF→PPTX, PDF→XLSX, import HTML and import EPUB broken. The Flatpak isn't currently in any CI workflow and Flathub hasn't shipped the app (their no-AI policy blocked the previous PR), so this is dormant rather than broken-in-production. Add a "Status: dormant" section to flatpak/README.md with the precise list of missing deps and the regeneration recipe to run before the next Flathub submission attempt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 unrelated cleanups bundled because both are documentation/style with no behavioural change.
B — Silence 9 `py/empty-except` CodeQL notes
Replace defensive `try: ... except Exception: pass` blocks with the canonical `with contextlib.suppress(...):` form. Same runtime behaviour, but CodeQL recognises the idiom and stops flagging. Each location is intentional defensive code (file unlinks during cleanup, splash destroy, update-thread shutdown, etc.) where surfacing the failure would only add noise.
Locations:
C — Document the Flatpak divergence
`flatpak/requirements-pinned.txt` is missing cryptography, python-pptx, openpyxl, beautifulsoup4, ebooklib versus the root `requirements.txt`. The divergence happened because new Python deps landed in `requirements.txt` (mostly in v1.12.0) without regenerating the Flatpak pin file. Dependabot keeps shared packages in sync but won't add new ones.
Effect: a Flatpak built today would have PDF→PPTX, PDF→XLSX, import HTML and import EPUB broken. Other tools work. Since Flatpak isn't built in CI and Flathub hasn't shipped us, this is dormant rather than user-visible — but it must be fixed before the next Flathub PR.
Adds a "Status: dormant" section to `flatpak/README.md` with the missing-deps list and the `req2flatpak` regeneration recipe to run before submission.
Test plan
🤖 Generated with Claude Code