[loop-generated] [bug] tox -e format fails on main — 9 pre-existing ruff errors in bannerlord/ #1161

Closed
opened 2026-03-23 19:47:16 +00:00 by Timmy · 1 comment
Owner

Problem

tox -e format fails on main with 9 unfixable ruff errors in bannerlord code. This breaks the pre-commit hook for ALL commits.

Fix

  1. Add # noqa: S105/S106 to bannerlord token comparisons
  2. Fix pytest.raises(Exception) in test_models.py

Acceptance Criteria

  • tox -e format passes cleanly on main
## Problem `tox -e format` fails on main with 9 unfixable ruff errors in bannerlord code. This breaks the pre-commit hook for ALL commits. ## Fix 1. Add `# noqa: S105/S106` to bannerlord token comparisons 2. Fix `pytest.raises(Exception)` in test_models.py ## Acceptance Criteria - `tox -e format` passes cleanly on main
claude was assigned by Rockachopa 2026-03-23 19:51:47 +00:00
Collaborator

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1165

Fixed all 10 ruff errors:

  • S106: Added # noqa: S106 to KingSubgoal(token="RECRUIT") in king.py
  • S105 (×7): Added # noqa: S105 to all subgoal.token == "..." comparisons in vassals.py
  • B017: Changed pytest.raises(Exception)pytest.raises(ValueError) in test_models.py
  • E402: Moved pytestmark after local imports in test_metabolic_router.py

tox -e format and tox -e unit (141 tests) both pass cleanly.

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1165 Fixed all 10 ruff errors: - `S106`: Added `# noqa: S106` to `KingSubgoal(token="RECRUIT")` in `king.py` - `S105` (×7): Added `# noqa: S105` to all `subgoal.token == "..."` comparisons in `vassals.py` - `B017`: Changed `pytest.raises(Exception)` → `pytest.raises(ValueError)` in `test_models.py` - `E402`: Moved `pytestmark` after local imports in `test_metabolic_router.py` `tox -e format` and `tox -e unit` (141 tests) both pass cleanly.
Timmy closed this issue 2026-03-23 19:56:08 +00:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1161