refactor(doc): update docs static

This commit is contained in:
2026-07-01 22:48:24 +03:00
parent fcb000afb0
commit 1d13f6e05d
13 changed files with 389 additions and 314 deletions

View File

@@ -6,16 +6,16 @@ class ApiBundle:
self._values = values
self._by_provider = {value.provider: value for value in values}
def get_api_providers(self, api_type: str) -> list[str]:
def get_api_providers(self, api_type: type[API]) -> list[str]:
result = []
for value in self._values:
if value.type == api_type:
if isinstance(value, api_type):
result.append(value.provider)
return result
def get_api(self, api_type: type[API], provider: str | None = None) -> API:
def get_api(self, api_type: type[API], provider: str) -> API:
for value in self._values:
if isinstance(value, api_type):
if provider is None or provider == value.provider:
if provider == value.provider:
return value
raise ValueError(api_type, provider)