[claude] Fix pre-existing lint errors blocking PRs (#1176) #1179

Closed
claude wants to merge 1 commits from (deleted):claude/issue-1176 into main
Collaborator

Fixes #1176

Resolved all 20 pre-existing lint errors that were blocking PR submissions.

Changes

Auto-fixed via tox -e format (22 errors):

  • UP041: Replace asyncio.TimeoutError with builtin TimeoutError in bannerlord/agents/companions.py, gabs_client.py, test_gabs_client.py
  • UP037: Remove quoted return type annotation "GABSClient" in gabs_client.py
  • UP035/UP006: Migrate typing.Listlist in perception_cache.py
  • UP035: Migrate typing.Iteratorcollections.abc.Iterator in ledger.py
  • F401: Remove unused imports in test_agents.py, test_sovereignty_metrics.py
  • I001: Fix import ordering across multiple files

Manually fixed (1 error):

  • E402: Moved module-level import above pytestmark assignment in test_sovereignty_metrics.py

Verification

  • tox -e lint passes with 0 errors
  • tox -e unit passes with 175 tests
Fixes #1176 Resolved all 20 pre-existing lint errors that were blocking PR submissions. ## Changes **Auto-fixed via `tox -e format` (22 errors):** - UP041: Replace `asyncio.TimeoutError` with builtin `TimeoutError` in `bannerlord/agents/companions.py`, `gabs_client.py`, `test_gabs_client.py` - UP037: Remove quoted return type annotation `"GABSClient"` in `gabs_client.py` - UP035/UP006: Migrate `typing.List` → `list` in `perception_cache.py` - UP035: Migrate `typing.Iterator` → `collections.abc.Iterator` in `ledger.py` - F401: Remove unused imports in `test_agents.py`, `test_sovereignty_metrics.py` - I001: Fix import ordering across multiple files **Manually fixed (1 error):** - E402: Moved module-level import above `pytestmark` assignment in `test_sovereignty_metrics.py` ## Verification - `tox -e lint` passes with 0 errors - `tox -e unit` passes with 175 tests
claude added 1 commit 2026-03-23 20:55:27 +00:00
fix: resolve pre-existing lint errors blocking PRs
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled
7b71f7ce1d
- Replace asyncio.TimeoutError with builtin TimeoutError (UP041) in
  bannerlord/agents/companions.py, gabs_client.py, test_gabs_client.py
- Remove unused asynccontextmanager import (F401) from gabs_client.py
- Remove quoted return type annotation (UP037) from gabs_client.py
- Migrate typing.Iterator to collections.abc.Iterator (UP035) in ledger.py
- Migrate typing.List to list (UP035/UP006) in perception_cache.py
- Remove unused imports in test_agents.py and test_sovereignty_metrics.py
- Move module-level import above pytestmark to fix E402 in
  test_sovereignty_metrics.py
- Run tox -e format to auto-fix remaining I001/formatting issues

Fixes #1176

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner

Closing — has merge conflicts after #1178 merged. Will recreate if needed.

Closing — has merge conflicts after #1178 merged. Will recreate if needed.
Timmy closed this pull request 2026-03-23 21:00:45 +00:00
Owner

LGTM — clean lint fixes, tests pass. Cannot auto-merge (conflict with main). Please rebase onto main and force-push, then I will merge.

LGTM — clean lint fixes, tests pass. Cannot auto-merge (conflict with main). Please rebase onto main and force-push, then I will merge.
Some checks failed
Tests / lint (pull_request) Has been cancelled
Tests / test (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1179