You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Polish-only pass against the acceptance criteria of issue #29. No
production logic changed; behaviour is identical end-to-end (178/178
unittests pass, every endpoint smokes 200 with the same response sizes
as master).
What landed:
* mypy now exits zero on the repo. Three small annotation fixes
(scripts/export.py:54 `existing: dict = {}`, api/search.py:54
`combined: list = []`, utils/exclusion_rules.py:76 `tokens:
list[str | tuple[str, str]] = []`), one inner-loop variable rename
in scripts/export.py to dodge a `Assignment to variable "e" outside
except: block` clash with the surrounding `except … as e:`, and an
empty `scripts/__init__.py` so mypy stops finding the script under
two module names.
* `continue-on-error: true` removed from the mypy step in
`.github/workflows/tests.yml`. Type errors now fail the job.
Comment updated to explain why.
* Ruff + flake8 clean: 11 auto-fixed (F401 unused imports, F541 empty
f-strings, F841 unused local `db_path` in api/workspaces.py), 5
manual renames of ambiguous `l` → `ln` / `log` / `layout / entry`,
one F811 fix in app.py (duplicate `import sys`), one E402 import
moved to the top of api/workspaces.py, and `# noqa: E402` markers on
the scripts/export.py imports that legitimately come after
`sys.path.insert(0, …)`.
* Bare `print()` error logging in api/composers.py (2), api/search.py
(3) and api/workspaces.py (7) replaced with
`_logger = logging.getLogger(__name__)` calls. Endpoint-level
catches use `_logger.exception(...)` so the traceback survives; the
two per-row catches (`CLI: could not read session …` and
`Error parsing composer data for …`) use
`_logger.warning(..., exc_info=True)` because they're per-iteration,
not endpoint-level. Matches the convention already used in
scripts/export.py:42 and utils/exclusion_rules.py:191.
Verified locally:
- python3 -m mypy --ignore-missing-imports --no-strict-optional .
→ Success: no issues found in 35 source files
- ruff check api/ utils/ scripts/export.py app.py → All checks passed
- flake8 --select=F,E9,W6 api/ utils/ scripts/export.py app.py → clean
- python3 -m unittest discover tests → Ran 178 tests, OK
- python3 app.py boots clean; GET / + /api/workspaces +
/api/composers + /api/search?q=foo all return 200
0 commit comments