Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Code quality] Stop swallowing exceptions: 341 `try/except/pass` and 751 blind `except Exception` in app/

Open
#783 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend, testing

Research direction

Start by reading the Ruff configuration in pyproject.toml and the exception handling in app/core/mover.py, app/core/history.py, and the undo and rollback paths. Run ruff check app --select S110,BLE001,SIM105 to inspect the current findings, then add the rules with a baseline and work through one area at a time. Done means CI enforces all three rules, the baseline only shrinks, and the mover, undo, rollback, and history paths contain no swallowed exceptions.

Written by the indexing model from the issue text.

Description

architecture enhancement ready-for-agent

Problem

ruff check app --select S110,BLE001,SIM105 on main (2026-10-19):

Rule Count Meaning
S110 try-except-pass 341 the failure is discarded with no log
BLE001 blind-except 751 except Exception / bare except
SIM105 suppressible-exception 158 try/except/pass that should be contextlib.suppress(SpecificError)

Most S110 hits are in app/ui/tui.py (86), app/core/history.py (28), analyzer_strategies.py (22), user_space_bootstrap.py (21), daemon.py (17), db.py (15), extractor_strategies.py (15), mover.py (14), main.py (13) and db_conn.py (11). Several of these sit on move, undo and rollback paths. There, a swallowed error means a file operation silently didn't happen, and the next bug report has no trace to follow.

Proposed approach

  1. Ratchet first. Enable S110, BLE001 and SIM105 in [tool.ruff.lint] with the existing hits listed in a baseline. One way is per-file ignores, generated once and shrunk over time. New code can't add more, and nothing gets rewritten in bulk.
  2. Fix by risk, one area per PR. Start with mover, undo, rollback and history, then the DB layer, then the daemon, then the UI. For each block, do one of the following:
    • catch the specific exception the call can raise;
    • log it at debug or warning with context, if continuing is correct;
    • let it propagate, if the caller can handle it;
    • use contextlib.suppress(SpecificError) for intentional best-effort cleanup.
  3. Remove each file from the baseline once it's clean.

Acceptance criteria

  • S110, BLE001 and SIM105 are enforced in CI, with a baseline that only shrinks.
  • No except ...: pass remains on the mover, undo, rollback or history paths.

Tracked as item 10 in the 2026-10-19 tech-debt register.

Dominant language
Python
Stars
1
Forks
0
Avg merge
10h 10m
Merged PRs (30d)
420

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fderuiter/sortify

All issues in fderuiter/sortify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.