Remove dead code from compiler, auth, and config #153

Merged
forgejo_admin merged 1 commit from 152-dead-code-cleanup into main 2026-03-14 13:40:35 +00:00
Contributor

Summary

Removes dead code left behind after the frontend/template removal in PR #151: stale docstring references in the block compiler, unused auth functions, and an unreferenced secret_key config field.

Changes

  • src/pal_e_docs/blocks/compiler.py: Removed docstring references to deleted sanitize, autolink, and wrap_tables modules
  • src/pal_e_docs/auth.py: Removed verify_password, authenticate_user, get_current_user functions and their unused imports (sqlalchemy.orm.Session, starlette.requests.Request, pal_e_docs.models.User). Only hash_password remains (still imported by main.py)
  • src/pal_e_docs/config.py: Removed secret_key field (not referenced anywhere in the codebase)

Test Plan

  • Tests pass locally (497 passed)
  • ruff check src/ passes with no violations
  • Grep confirmed no remaining references to removed functions or secret_key
  • No regressions -- all existing tests unaffected

Review Checklist

  • Passed automated review-fix loop
  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Closes #152
  • Follow-up to PR #151 (frontend/template removal)
## Summary Removes dead code left behind after the frontend/template removal in PR #151: stale docstring references in the block compiler, unused auth functions, and an unreferenced `secret_key` config field. ## Changes - `src/pal_e_docs/blocks/compiler.py`: Removed docstring references to deleted `sanitize`, `autolink`, and `wrap_tables` modules - `src/pal_e_docs/auth.py`: Removed `verify_password`, `authenticate_user`, `get_current_user` functions and their unused imports (`sqlalchemy.orm.Session`, `starlette.requests.Request`, `pal_e_docs.models.User`). Only `hash_password` remains (still imported by `main.py`) - `src/pal_e_docs/config.py`: Removed `secret_key` field (not referenced anywhere in the codebase) ## Test Plan - [x] Tests pass locally (497 passed) - [x] `ruff check src/` passes with no violations - [x] Grep confirmed no remaining references to removed functions or `secret_key` - [x] No regressions -- all existing tests unaffected ## Review Checklist - [x] Passed automated review-fix loop - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive ## Related - Closes #152 - Follow-up to PR #151 (frontend/template removal)
Remove dead code: stale docstring refs, unused auth functions, unused secret_key
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
329fa474c8
- compiler.py: remove docstring references to deleted sanitize/autolink/wrap_tables modules
- auth.py: remove verify_password, authenticate_user, get_current_user (unused after frontend removal)
- config.py: remove secret_key field (no longer referenced anywhere)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Contributor

Self-Review: LGTM

Diff audit (3 files, +1 / -30):

  1. compiler.py -- Only the stale docstring referencing deleted sanitize, autolink, wrap_tables modules was trimmed. No functional code touched.
  2. auth.py -- Removed 3 unused functions (verify_password, authenticate_user, get_current_user) and 3 imports that only those functions needed. hash_password + bcrypt import remain (still used by main.py).
  3. config.py -- Removed secret_key field. Grep confirmed zero references anywhere in src/ or tests/.

Verification:

  • ruff check src/ -- clean
  • pytest tests/ -v -- 497 passed
  • No secrets, no unrelated changes, no regressions.
## Self-Review: LGTM **Diff audit (3 files, +1 / -30):** 1. `compiler.py` -- Only the stale docstring referencing deleted `sanitize`, `autolink`, `wrap_tables` modules was trimmed. No functional code touched. 2. `auth.py` -- Removed 3 unused functions (`verify_password`, `authenticate_user`, `get_current_user`) and 3 imports that only those functions needed. `hash_password` + `bcrypt` import remain (still used by `main.py`). 3. `config.py` -- Removed `secret_key` field. Grep confirmed zero references anywhere in `src/` or `tests/`. **Verification:** - `ruff check src/` -- clean - `pytest tests/ -v` -- 497 passed - No secrets, no unrelated changes, no regressions.
forgejo_admin deleted branch 152-dead-code-cleanup 2026-03-14 13:40:35 +00:00
Commenting is not possible because the repository is archived.
No description provided.