mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix type annotation bugs and remove unused imports
This fixes issues introduced by the ruff commit e57f391a which converted Optional[x] to x | None: - Fixed datasette/app.py line 1024: Dict[id | str, Dict] -> Dict[int | str, Dict] (was using id built-in function instead of int type) - Fixed datasette/app.py line 1074: Optional["Resource"] -> "Resource" | None - Added 'from __future__ import annotations' for Python 3.10 compatibility - Added TYPE_CHECKING blocks to avoid circular imports - Removed dead code (unused variable assignments) from cli.py and views - Removed unused imports flagged by ruff across multiple files - Fixed test fixtures: moved app_client fixture imports to conftest.py (fixed 71 test errors caused by fixtures not being registered) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2c8e92acf2
commit
5c537e0a3e
24 changed files with 45 additions and 31 deletions
|
|
@ -1,4 +1,3 @@
|
|||
from asgi_csrf import Errors
|
||||
from bs4 import BeautifulSoup as Soup
|
||||
from datasette.app import Datasette
|
||||
from datasette.utils import allowed_pragmas
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue