chore(lint): clean up ruff/black/isort/prettier drift across main#202
Merged
Conversation
The local-only lint gate (SECURITY.md §8 — no CI) had drifted: a clean `ruff check` reported 20 errors, `black --check` wanted 13 files, and `prettier --check` flagged 2 frontend files. This brings the tree back to fully green. Backend (ruff): - `api/filters.py` — S112: the broken-SimpleListFilter skip now logs at debug (`logger.debug(..., exc_info=True)`) instead of silently swallowing; behavior unchanged, observability improved. - `views.py` — SIM102: collapse the nested `if not is_admin_user: if not REACT_LOGIN:` auth gate into a single `and` (logic identical). - tests — SIM105 (`contextlib.suppress`), SIM117 (single `with`), SIM118 (`key in dict`), E741 (`l` → `opt`), E501 (wrap), E402 (`test_spa_index.py` branding-section imports hoisted to the top block, dedup'd). Formatting: - `black` reformatted 12 files; `isort --force-single-line` applied; `prettier --write` on `DetailPage.tsx` + `HomePage.tsx`. Verified green: `ruff check`, `black --check`, `isort --check-only`, `prettier --check` (frontend), `pnpm -r typecheck` (7 packages), `pytest` (353 passed). No behavior change — pure lint/format + the one debug-log addition. Tier 3 (touches `api/` + `views.py`) — self-merging under the repo-owner's full-tier authorization; no logic change, full suite green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8 tasks
MartinCastroAlvarez
pushed a commit
that referenced
this pull request
May 26, 2026
Ships the batch merged since 0.2.0a2: - SECURITY: SW message-handler origin check (#208, CodeQL js/missing-origin-check) — the artifact's service worker now rejects cross-origin cache-control messages. - PWA backend serving (#200), React login form end-to-end (#190), create/Add form completing CRUD (#199), autocomplete FK widget (#207), date_hierarchy drill-down (#205), action-label + list cosmetics fixes (#203/#204), lint cleanup (#202). 368 tests pass. Tier 6 — version bump; publish via the Security deploy-gate under the standing "deploy regularly if secure" directive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MartinCastroAlvarez
added a commit
that referenced
this pull request
May 26, 2026
Ships the batch merged since 0.2.0a2: - SECURITY: SW message-handler origin check (#208, CodeQL js/missing-origin-check) — the artifact's service worker now rejects cross-origin cache-control messages. - PWA backend serving (#200), React login form end-to-end (#190), create/Add form completing CRUD (#199), autocomplete FK widget (#207), date_hierarchy drill-down (#205), action-label + list cosmetics fixes (#203/#204), lint cleanup (#202). 368 tests pass. Tier 6 — version bump; publish via the Security deploy-gate under the standing "deploy regularly if secure" directive. Co-authored-by: Martin Castro Laminrs <mcastro@laminr.ai> 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.
The local-only lint gate (SECURITY.md §8, no CI) had drifted — clean
ruff checkreported 20 errors,blackwanted 13 files,prettierflagged 2 frontend files. This brings the tree fully green.logger.debug(..., exc_info=True)(no silent swallow; behavior unchanged).ifs collapsed into oneand(logic identical).test_spa_index.pybranding imports).black(12 files) +isort+prettier(DetailPage, HomePage).Verified: ruff/black/isort/prettier/typecheck all green; 353 pytest passed. No behavior change. Self-merging under full-tier authorization.