This commit is contained in:
tehcoderer
2023-08-08 10:09:24 -04:00
parent e0dc123a91
commit ecf16ca58b
3 changed files with 6 additions and 9 deletions

View File

@@ -5,7 +5,7 @@ from datetime import datetime
from typing import Any, Dict, List, Optional
from openbb_provider import helpers
from openbb_provider.models.stock_news import StockNewsData
from openbb_provider.standard_models.stock_news import StockNewsData
from pydantic import BaseModel, Field

View File

@@ -5,7 +5,10 @@ from datetime import datetime
from typing import Any, Dict, List, Optional
from openbb_provider.abstract.fetcher import Fetcher
from openbb_provider.models.stock_quote import StockQuoteData, StockQuoteQueryParams
from openbb_provider.standard_models.stock_quote import (
StockQuoteData,
StockQuoteQueryParams,
)
from pydantic import validator
from openbb_fmp.utils.helpers import get_data_many, get_querystring
@@ -45,8 +48,6 @@ class FMPStockQuoteData(StockQuoteData):
class FMPStockQuoteFetcher(
Fetcher[
StockQuoteQueryParams,
List[StockQuoteData],
FMPStockQuoteQueryParams,
List[FMPStockQuoteData],
]

View File

@@ -435,16 +435,12 @@ class ProviderInterface:
class Config(BaseConfig):
extra = Extra.allow
ReturnModel = create_model( # type: ignore
result[model_name] = create_model( # type: ignore
model_name,
__config__=Config,
**fields_dict, # type: ignore
)
# TODO: If we want to support multiple return schemas, we need
# to change this `List` to the schema type
result[model_name] = List[ReturnModel] # type: ignore
return result
def _get_provider_literal(self, available_providers: List[str]) -> type: