Replace per-request Chromium launch/teardown with a module-level persistent browser. get_browser() lazy-initializes with is_connected() auto-reconnect; shutdown_browser() is wired into FastAPI lifespan for clean teardown. Pages are created per-request and closed in a finally block to prevent leaks. Also fixed pre-existing ruff errors in staged files (E402 noqa comments, F541 f-string prefix removal, F841 unused variable rename) that were blocking the pre-commit hook. Closes #89 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| models | ||
| routers_v2 | ||
| seed | ||
| services | ||
| __init__.py | ||
| card_creation.py | ||
| db_engine.py | ||
| db_helpers.py | ||
| dependencies.py | ||
| main.py | ||
| player_scouting.py | ||