refactor(data): unify vendor errors under a VendorError hierarchy

Every condition where a vendor cannot return usable data now derives from a
single VendorError base (errors.py): NoMarketDataError, VendorRateLimitError,
and VendorNotConfiguredError (still a ValueError for back-compat). Vendor-named
errors subclass the generic bases, and the router catches the base types, so a
new vendor needs no new except clause. Not-configured now has explicit
try-next-vendor handling instead of falling through the generic catch-all. The
number of error types tracks the number of distinct router reactions, not the
number of causes.
This commit is contained in:
Yijia-Xiao
2026-06-14 07:10:15 +00:00
parent db059034a2
commit 7df18fc912
7 changed files with 226 additions and 64 deletions

View File

@@ -81,3 +81,8 @@ ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ["F401"] # intentional re-exports
[tool.ruff.lint.isort]
# Keep multiple aliased names from one module in a single combined import block
# (e.g. the vendor re-exports in interface.py) instead of one statement per name.
combine-as-imports = true