rename method and add todo

This commit is contained in:
Diogo Sousa
2023-07-21 14:11:59 +01:00
parent c09cdc5053
commit a06ec39409
2 changed files with 7 additions and 5 deletions

View File

@@ -69,8 +69,8 @@ class ProviderInterface:
Methods
-------
get_registry : ProviderRegistry
Get provider registry
build_registry : ProviderRegistry
Build provider registry
"""
def __init__(self) -> None:
@@ -137,8 +137,8 @@ class ProviderInterface:
"""List of model names."""
return list(self.__map.keys())
def get_registry(self) -> ProviderRegistry:
"""Get provider registry."""
def build_registry(self) -> ProviderRegistry:
"""Build provider registry."""
return build_provider_registry(extensions_dict__)
@staticmethod

View File

@@ -69,7 +69,9 @@ class Query:
def execute(self) -> BaseModel:
"""Execute the query."""
registry = get_provider_interface().get_registry()
# TODO: Understand if we really need to create the registry in every call
registry = get_provider_interface().build_registry()
creds = self.cc.user_settings.credentials.dict()
query_params = self.to_query_params(self.standard_params)