diff --git a/setup.cfg b/setup.cfg index b8fff52..6dd9111 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,3 +53,6 @@ files = tconnectsync follow_imports = silent ignore_missing_imports = True +# Third-party deps such as requests ship no type stubs; treat them as untyped +# instead of failing (older mypy does not silence this via ignore_missing_imports). +disable_error_code = import-untyped diff --git a/tconnectsync/api/tandemsource.py b/tconnectsync/api/tandemsource.py index a530715..a02aeb2 100644 --- a/tconnectsync/api/tandemsource.py +++ b/tconnectsync/api/tandemsource.py @@ -221,6 +221,8 @@ class TandemSourceApi: # US default would send EU accounts to the US endpoints (#152). if not region: region = secret.TCONNECT_REGION + if not region: + raise ValueError("No region configured. Set TCONNECT_REGION to 'US' or 'EU'.") self.region = region.upper() if self.region not in ['US', 'EU']: raise ValueError(f"Invalid region '{region}'. Must be 'US' or 'EU'.")