Skip to content

Replace blind except Exception and rename builtin-shadowing 'open' params #14

Description

@tschm

Subcategory: Linting/style (4→7) and Error handling & CLI UX (7→9).

Problem. ruff flags blind except Exception (BLE001), the parameter name open shadowing a builtin (A001/A002), and an unused function argument (ARG001).

Files / lines to change:

  • src/pycharting/api/interface.py:212 — narrow the except Exception around webbrowser.open.
  • src/pycharting/api/interface.py:37,131 and src/pycharting/data/ingestion.py:30,241 — rename open param (e.g. open_).
  • src/pycharting/core/server.py:220 — drop/underscore the unused request arg in server_error_handler.
  • tests/test_lifecycle.py:209,232 — narrow blind excepts (or # noqa with justification).

Done when: make fmt reports no BLE001 / A001 / A002 / ARG001.

Evidence: BLE001 Do not catch blind exception; A002 Function argument 'open' is shadowing a Python builtin.

Context: $PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions