Commit Graph

46 Commits

Author SHA1 Message Date
Cal Corum
5496c96b32 Standardize sWAR display formatting to 2 decimal places
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>
2025-12-09 20:16:47 -06:00
Cal Corum
bbb4233b45 Replace hardcoded salary cap with dynamic Team.salary_cap
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>
2025-12-09 17:14:17 -06:00
Cal Corum
4e71c33344 Reapply bug fixes to branch 2025-09-20 11:02:05 -05:00
Cal Corum
2b4b84e193 Schedule fix, transaction priority fix 2025-07-25 10:00:25 -05:00
Cal Corum
9bb84ce287 Post Draft fixes for season 12 2025-07-12 23:15:00 -05:00
Cal Corum
afba7ce456 Update calls for /current to new Current class 2025-06-07 23:52:59 -05:00
Cal Corum
ab4147a25f Season 12 Offseason Updates 2025-05-25 16:39:50 -05:00
Cal Corum
4363423876 Added support for expanded MiL 2025-04-06 12:11:47 -05:00
Cal Corum
81933e8329 Add error logging for failed transaction notifications 2025-01-18 07:24:51 -06:00
Cal Corum
3a1ec5e529 Turn off offseason flag 2024-12-16 09:04:30 -06:00
Cal Corum
86eab613aa S11 prep 2024-12-14 11:25:18 -06:00
Cal Corum
e54cf885ad Migrated to rotating log handler
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
2024-12-11 14:52:28 -06:00
Cal Corum
cb874c483c Set offseason flag 2024-12-03 15:19:13 -06:00
Cal Corum
701a8b78d4 Update transactions.py
Clean up transaction failures
2024-10-05 22:27:18 -05:00
Cal Corum
af2baa493c Bug fixes 2024-07-14 13:23:49 -05:00
Cal Corum
6308d32f8e Migrate from PATCH /players to PUT 2024-07-03 11:20:03 -05:00
Cal Corum
8b6b783502 Season 10 Updates 2024-07-01 11:39:05 -05:00
Cal Corum
c24a71a4ee S10 Updates 2024-06-27 00:31:03 -05:00
Cal Corum
00531f4708 Update transactions.py 2024-02-04 23:02:05 -06:00
Cal Corum
c729e4a122 Update transactions.py
Cleanup weekly_loop
2024-02-04 10:29:32 -06:00
Peter
95be95bf9c Remove weekly info update from end freeze path as its only needed when the week rolls over (begin freeze) 2024-02-04 09:30:36 -05:00
Peter
83e3cbd081 Simplify is_div_week logic and end all weeks with day game 2024-02-04 09:26:02 -05:00
Cal Corum
a2e8f4b3eb I'm an adult 2024-01-04 13:48:53 -06:00
Cal Corum
6192d87840 Season 9 prep 2024-01-04 13:16:36 -06:00
Cal Corum
dc772220cb Postseason bugfixes 2023-12-20 23:14:03 -06:00
Cal Corum
d64caede88 Update transactions.py
Allow week 18 moves
2023-12-04 13:40:26 -06:00
Cal Corum
af14e3989f Update weekly posts
Add bot ready check to weekly post
Add season post to weekly message
2023-11-29 09:56:53 -06:00
Cal Corum
5b7a0e85b8 Bug fixes 2023-09-07 14:09:23 -05:00
Cal Corum
611d2ea075 Update transactions.py
Updated tiebreaker calc for transactions involving free agency
2023-08-19 01:05:10 -05:00
Cal Corum
bb6cc8ee84 Implement !standings for s8 2023-08-05 00:27:31 -05:00
Cal Corum
2a2b830169 Update transactions.py
remove static va for il moves
2023-07-31 23:08:02 -05:00
Cal Corum
f0421a19de Final update to legality check 2023-07-31 16:17:28 -05:00
Cal Corum
a81e07b8cc Update transactions.py
Fixed mil roster check in Transaction class
2023-07-31 13:49:58 -05:00
Cal Corum
6650970bbc Update transaction loop 2023-07-31 00:29:38 -05:00
Cal Corum
3cc12d2cf1 Updating cogs for new v3 API 2023-07-24 23:40:50 -05:00
Cal Corum
6ed2f43421 v3 api updates 2023-07-09 16:36:51 -05:00
Cal Corum
0ccc60deb4 v3 API Updates - admins, transactions 2023-07-09 10:30:00 -05:00
Cal Corum
ac34c5dd10 Migrate get_current() to db_get 2023-06-27 10:18:58 -05:00
Cal Corum
cce74c4f92 Awaiting db_calls 2023-05-09 11:38:25 -05:00
Cal Corum
1f15c74db2 Update transactions.py 2023-03-25 13:53:19 -05:00
Cal Corum
20cc1e065d Fix transaction freeze bug 2023-03-25 13:25:51 -05:00
Cal Corum
5499452150 Update transactions.py
Add freeze transaction cancellation notification
2023-03-11 13:58:14 -06:00
Cal Corum
600419c035 Update transactions.py
Fix MiL freeze bug
2023-03-11 11:31:30 -06:00
Cal Corum
0ae150d36e Update transactions.py
Add timeout error handler
2023-03-07 13:07:38 -06:00
Cal Corum
1317783063 Resolved database timeout errors 2023-02-21 11:35:34 -06:00
Cal Corum
181689fb61
Initial commit 2023-02-19 21:22:57 -06:00