Fixed 10 locations with inconsistent WAR formatting:
cogs/transactions.py:
- Line 343: Trade player display
- Line 910: Week transaction display
- Lines 1296, 1783, 2084: Roster error displays (now >5.2f)
- Lines 2166, 2175: Guaranteed/frozen move displays
- Line 2303: MiL demotion display
cogs/draft.py:
- Line 218: Core players display
cogs/players.py:
- Line 2859: Player update display (both old and new values)
All user-facing sWAR values now consistently use :.2f format.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New test classes:
- TestEdgeCases: Negative values, large numbers, precision boundaries
- TestRealTeamModel: Tests with actual api_calls.team.Team model
Added 9 new tests (30 total):
- Negative salary cap handling
- Negative WAR values
- Very large/small cap values
- Float precision boundary (exactly at tolerance)
- Real Pydantic Team model integration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
P2 Tasks completed:
- SWAR-002: Update draft.py cap check to use exceeds_salary_cap()
- SWAR-003: Update trade validation in transactions.py
- SWAR-004: Update first drop/add validation
- SWAR-005: Update second drop/add validation
- SWAR-006: Update legal command roster validation
Changes:
- Enhanced helper functions to support both dict and Pydantic models
- All error messages now show actual team cap value
- Added 4 additional tests for Pydantic model support (21 total)
- All salary cap checks now use centralized exceeds_salary_cap()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add DEFAULT_SALARY_CAP (32.0) and SALARY_CAP_TOLERANCE (0.001) constants
- Add get_team_salary_cap() for retrieving team cap with fallback
- Add exceeds_salary_cap() for centralized cap validation
- Add 17 unit tests covering all edge cases
- Update refactor plan marking P1 tasks complete
These helpers will be used by P2 tasks to replace hardcoded 32.0/32.001
values in draft.py and transactions.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tracks 8 tasks to replace hardcoded 32.0/32.001 salary cap values
with dynamic Team.salary_cap field across draft.py and transactions.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Syncs with database schema change - new nullable float column for tracking team salary caps.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added random_gif()
Moved back from exception-handler cog to local error handling
Updated !keepers to be season agnostic
Added new !sync param to update and clear local guild
Added error checking to !player command