Run Black formatter across 83 files and fix 1514 ruff violations: - E722: bare except → typed exceptions (17 fixes) - E711/E712/E721: comparison style fixes with noqa for SQLAlchemy (44 fixes) - F841: unused variable assignments (70 fixes) - F541/F401: f-string and import cleanup (1383 auto-fixes) Remaining 925 errors are all F403/F405 (star imports) — structural, requires converting to explicit imports in a separate effort. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
# Players package for Paper Dynasty Discord Bot
|
|
# Refactored from the original monolithic players.py cog
|
|
|
|
from .shared_utils import get_ai_records, get_record_embed, get_record_embed_legacy
|
|
import logging
|
|
from discord.ext import commands
|
|
|
|
__all__ = ["get_ai_records", "get_record_embed", "get_record_embed_legacy"]
|
|
|
|
|
|
async def setup(bot):
|
|
"""
|
|
Setup function for the players package.
|
|
Loads all player-related cogs.
|
|
"""
|
|
# Import and setup all player modules
|
|
from .gauntlet import Gauntlet
|
|
from .paperdex import Paperdex
|
|
from .player_lookup import PlayerLookup
|
|
from .standings_records import StandingsRecords
|
|
from .team_management import TeamManagement
|
|
from .utility_commands import UtilityCommands
|
|
|
|
await bot.add_cog(Gauntlet(bot))
|
|
await bot.add_cog(Paperdex(bot))
|
|
await bot.add_cog(PlayerLookup(bot))
|
|
await bot.add_cog(StandingsRecords(bot))
|
|
await bot.add_cog(TeamManagement(bot))
|
|
await bot.add_cog(UtilityCommands(bot))
|
|
|
|
logging.getLogger("discord_app").info("All player cogs loaded successfully")
|