build credentials mapping : rename func

This commit is contained in:
Diogo Sousa
2023-07-21 14:15:00 +01:00
parent a06ec39409
commit 42aa9cde99
2 changed files with 4 additions and 4 deletions

View File

@@ -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)

View File

@@ -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: