[loop-generated] [refactor] Break up request_logging.py::dispatch() — 78 lines #562

Closed
opened 2026-03-20 01:19:40 +00:00 by Timmy · 1 comment
Owner

Refactor target

src/dashboard/middleware/request_logging.py::dispatch is 78 lines (line 45). Extract request parsing, response handling, and logging into helpers.

Files

  • src/dashboard/middleware/request_logging.py

Acceptance criteria

  • No function exceeds 40 lines
  • All existing tests pass (tox -e unit)
  • No behavior change
## Refactor target `src/dashboard/middleware/request_logging.py::dispatch` is 78 lines (line 45). Extract request parsing, response handling, and logging into helpers. ### Files - `src/dashboard/middleware/request_logging.py` ### Acceptance criteria - No function exceeds 40 lines - All existing tests pass (`tox -e unit`) - No behavior change
Timmy closed this issue 2026-03-20 01:20:09 +00:00
Author
Owner

Closing — dispatch() is already well-structured with _get_client_ip() and _log_request() extracted as helpers. The remaining 78 lines include docstrings and a clear try/except flow. Forcing further extraction would hurt readability.

Closing — `dispatch()` is already well-structured with `_get_client_ip()` and `_log_request()` extracted as helpers. The remaining 78 lines include docstrings and a clear try/except flow. Forcing further extraction would hurt readability.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#562