mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-11-02 05:37:14 +08:00
Add mypy>=2.1.0 as a dev dependency with a check_untyped_defs baseline config and per-module ignore overrides (module.__version__, httpx_socks, aiohttp, test.* method-assign), and run it in CI right after ruff. Convert positional Field(value, ...) defaults to Field(default=value, ...) across models/config.py so pydantic v2 stops treating aliased fields as required constructor args. Fix real bugs the sweep surfaced: unguarded None bangumi_id in TorrentManager.refind_poster, RSSAnalyser.torrent_to_data silently returning None past its declared type, missing __aenter__ guards on RequestURL/downloader clients, database/engine.py's sync sessionmaker on an AsyncEngine, and RequestContent.post_json shadowing RequestURL.post_json (renamed to post_form_json). Remove a dead, type-unsafe str_to_list() helper in api/bangumi.py. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z