Fix linting errors across backend and frontend
Backend: auto-fix and format all ruff issues, manually fix B904/B023/ SIM117/B007/E741/F841 errors, suppress B008 (FastAPI Depends) and F821 (SQLAlchemy forward refs) in config. Frontend: allow constant exports, disable React compiler-specific rules (set-state-in-effect, preserve-manual-memoization). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,7 @@ router = APIRouter()
|
||||
@router.get("/games")
|
||||
async def export_games(session: AsyncSession = Depends(get_session)):
|
||||
"""Export all games in seed JSON format."""
|
||||
result = await session.execute(
|
||||
select(Game).order_by(Game.name)
|
||||
)
|
||||
result = await session.execute(select(Game).order_by(Game.name))
|
||||
games = result.scalars().all()
|
||||
return [
|
||||
{
|
||||
@@ -154,7 +152,11 @@ async def export_game_bosses(
|
||||
"pokemon_name": bp.pokemon.name,
|
||||
"level": bp.level,
|
||||
"order": bp.order,
|
||||
**({"condition_label": bp.condition_label} if bp.condition_label else {}),
|
||||
**(
|
||||
{"condition_label": bp.condition_label}
|
||||
if bp.condition_label
|
||||
else {}
|
||||
),
|
||||
}
|
||||
for bp in sorted(b.pokemon, key=lambda p: p.order)
|
||||
],
|
||||
@@ -167,9 +169,7 @@ async def export_game_bosses(
|
||||
@router.get("/pokemon")
|
||||
async def export_pokemon(session: AsyncSession = Depends(get_session)):
|
||||
"""Export all pokemon in seed JSON format."""
|
||||
result = await session.execute(
|
||||
select(Pokemon).order_by(Pokemon.pokeapi_id)
|
||||
)
|
||||
result = await session.execute(select(Pokemon).order_by(Pokemon.pokeapi_id))
|
||||
pokemon_list = result.scalars().all()
|
||||
return [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user