mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 05:52:23 +00:00
build credentials mapping : rename func
This commit is contained in:
@@ -2,7 +2,7 @@ from dataclasses import dataclass, make_dataclass
|
||||
from typing import Any, Dict, List, Literal, Optional, Tuple, Union
|
||||
|
||||
from fastapi import Query
|
||||
from openbb_provider.map import build_model_mapping, get_credentials_mapping
|
||||
from openbb_provider.map import build_model_mapping, build_credentials_mapping
|
||||
from openbb_provider.registry import (
|
||||
ProviderRegistry,
|
||||
build_provider_registry,
|
||||
@@ -145,7 +145,7 @@ class ProviderInterface:
|
||||
def __get_credentials() -> Dict[str, Tuple[Optional[str], None]]:
|
||||
"""Get credentials."""
|
||||
credentials: Dict[str, Tuple[Optional[str], None]] = {}
|
||||
credentials_mapping = get_credentials_mapping()
|
||||
credentials_mapping = build_credentials_mapping()
|
||||
for provider_credentials in credentials_mapping.values():
|
||||
for credential in provider_credentials:
|
||||
credentials[credential] = (Optional[str], None)
|
||||
|
||||
@@ -274,7 +274,7 @@ def build_docstring_mapping() -> Dict:
|
||||
return mapping
|
||||
|
||||
|
||||
def get_credentials_mapping() -> Dict:
|
||||
def build_credentials_mapping() -> Dict:
|
||||
"""Build a mapping of the provider registry credentials.
|
||||
|
||||
Returns
|
||||
@@ -296,7 +296,7 @@ def get_credentials_mapping() -> Dict:
|
||||
return mapping
|
||||
|
||||
|
||||
get_credentials_mapping()
|
||||
build_credentials_mapping()
|
||||
|
||||
|
||||
def build_model_mapping() -> Dict:
|
||||
|
||||
Reference in New Issue
Block a user