[kimi-generated] Pre-existing lint errors blocking PRs #1176

Closed
opened 2026-03-23 20:42:52 +00:00 by kimi · 2 comments
Collaborator

Problem

The repository has 20 pre-existing lint errors in files unrelated to active work:

src/bannerlord/ (5 errors):

  • agents/companions.py:59 - UP041: Replace asyncio.TimeoutError with builtin TimeoutError
  • gabs_client.py:21 - F401: Unused import asynccontextmanager
  • gabs_client.py:84 - UP041: Replace asyncio.TimeoutError with builtin TimeoutError
  • gabs_client.py:103 - UP037: Remove quotes from type annotation
  • gabs_client.py:145 - UP041: Replace asyncio.TimeoutError with builtin TimeoutError
  • ledger.py:21 - UP035: Import Iterator from collections.abc

src/timmy/sovereignty/perception_cache.py (4 errors):

  • Line 6: UP035 - typing.List is deprecated
  • Line 28: UP006 - Use list instead of List
  • Line 51: UP006 - Use list instead of List
  • Line 70: UP006 - Use list instead of List

tests/unit/test_bannerlord/ (6 errors):

  • test_agents.py - I001, F401 (unused imports)
  • test_gabs_client.py - I001, UP041

tests/unit/test_sovereignty_metrics.py (5 errors):

  • Line 12: E402 - Module level import not at top
  • Line 17: F401 - Unused import get_metrics_store
  • Line 133: F401 - Unused import json

Impact

These errors cause tox -e lint and tox -e pre-push to fail, blocking PR submissions.

Suggested Fix

Run tox -e format to auto-fix 18 of 20 errors, then manually fix the remaining 2.

## Problem The repository has 20 pre-existing lint errors in files unrelated to active work: **src/bannerlord/ (5 errors):** - `agents/companions.py:59` - UP041: Replace `asyncio.TimeoutError` with builtin `TimeoutError` - `gabs_client.py:21` - F401: Unused import `asynccontextmanager` - `gabs_client.py:84` - UP041: Replace `asyncio.TimeoutError` with builtin `TimeoutError` - `gabs_client.py:103` - UP037: Remove quotes from type annotation - `gabs_client.py:145` - UP041: Replace `asyncio.TimeoutError` with builtin `TimeoutError` - `ledger.py:21` - UP035: Import `Iterator` from `collections.abc` **src/timmy/sovereignty/perception_cache.py (4 errors):** - Line 6: UP035 - `typing.List` is deprecated - Line 28: UP006 - Use `list` instead of `List` - Line 51: UP006 - Use `list` instead of `List` - Line 70: UP006 - Use `list` instead of `List` **tests/unit/test_bannerlord/ (6 errors):** - `test_agents.py` - I001, F401 (unused imports) - `test_gabs_client.py` - I001, UP041 **tests/unit/test_sovereignty_metrics.py (5 errors):** - Line 12: E402 - Module level import not at top - Line 17: F401 - Unused import `get_metrics_store` - Line 133: F401 - Unused import `json` ## Impact These errors cause `tox -e lint` and `tox -e pre-push` to fail, blocking PR submissions. ## Suggested Fix Run `tox -e format` to auto-fix 18 of 20 errors, then manually fix the remaining 2.
claude was assigned by Rockachopa 2026-03-23 20:45:56 +00:00
Collaborator

PR created: #1179

Fixed all 20 lint errors:

  • 22 auto-fixed via tox -e format (UP041, UP037, UP035, UP006, F401, I001)
  • 1 manually fixed: E402 in test_sovereignty_metrics.py (moved module import above pytestmark)

tox -e lint now passes clean. tox -e unit passes with 175 tests.

PR created: #1179 Fixed all 20 lint errors: - 22 auto-fixed via `tox -e format` (UP041, UP037, UP035, UP006, F401, I001) - 1 manually fixed: E402 in `test_sovereignty_metrics.py` (moved module import above `pytestmark`) `tox -e lint` now passes clean. `tox -e unit` passes with 175 tests.
Owner

Verified: tox -e lint passes clean on current main (all checks passed, 394 files formatted). The 20 lint errors listed in this issue have been fixed. Closing.

Verified: `tox -e lint` passes clean on current main (all checks passed, 394 files formatted). The 20 lint errors listed in this issue have been fixed. Closing.
Timmy closed this issue 2026-03-23 21:41:20 +00:00
Sign in to join this conversation.
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1176