Codebase audit identified ~50 lazy imports. Moved 42 unnecessary ones to
top-level imports — only keeping those justified by circular imports,
init-order dependencies, or optional dependency guards. Updated test mock
patch targets where needed. See #57 for remaining DI candidates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ran `ruff check --select F401 --fix` to auto-remove 221 unused imports,
manually removed 4 unused `import discord` from package __init__.py files,
and fixed test import for DISAPPOINTMENT_TIERS to reference canonical location.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added 16 tests covering all aspects of injury modal validation including
regular season and playoff-specific game limits.
Test Coverage:
- BatterInjuryModal week validation (5 tests)
* Regular season weeks (1-18) acceptance
* Playoff weeks (19-21) acceptance
* Invalid weeks rejection (0, 22+)
- BatterInjuryModal game validation (6 tests)
* Regular season: games 1-4 valid, game 5+ rejected
* Playoff round 1 (week 19): games 1-5 valid, game 6+ rejected
* Playoff round 2 (week 20): games 1-7 valid
* Playoff round 3 (week 21): games 1-7 valid
- PitcherRestModal validation (4 tests)
* Same week validation as BatterInjuryModal
* Same game validation as BatterInjuryModal
- Config-driven validation (1 test)
* Verifies custom config values are respected
All tests use proper mocking patterns:
- PropertyMock for TextInput.value (read-only property)
- Correct patch paths for config and services
- Complete model data for Pydantic validation
Test Results: 16/16 passing ✅🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>