mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 13:01:38 +00:00
merge
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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],
|
||||
]
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user