mirror of
https://github.com/bckelley/tconnectsync.git
synced 2026-08-24 03:34:12 -05:00
The Python 3.8 CI job installs an older mypy that behaves differently from newer releases, surfacing two things the newer local mypy did not: - requests (and other stub-less deps) raise `import-untyped`, which older mypy does not silence via ignore_missing_imports. Add `disable_error_code = import-untyped` so stub-less third-party libs are treated as untyped rather than failing the run. - TandemSourceApi.__init__: older mypy infers secret.TCONNECT_REGION as Optional[str], so region.upper() tripped union-attr. Guard against an unset region (also avoids an AttributeError at runtime) which narrows it to str. Verified with both mypy 1.19.1 and 2.3.0; tests still green (461 passed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UaQXTakxAKEfeeys5cv3en