removee optional extra_params

This commit is contained in:
montezdesousa
2023-07-10 02:16:28 +01:00
parent e765ff5c1c
commit b2cbdc65e2
3 changed files with 5 additions and 7 deletions

View File

@@ -1,6 +1,5 @@
# pylint: disable=import-outside-toplevel, W0613:unused-argument
"""News Router."""
from typing import Optional
from openbb_sdk_core.app.model.command_context import CommandContext
from openbb_sdk_core.app.model.command_output import CommandOutput
@@ -22,7 +21,7 @@ def globalnews(
cc: CommandContext,
provider_choices: ProviderChoices,
standard_params: StandardParams,
extra_params: Optional[ExtraParams] = None,
extra_params: ExtraParams,
) -> CommandOutput[BaseModel]:
"""Global News."""
return CommandOutput(results=Query(**locals()).execute())

View File

@@ -1,6 +1,5 @@
# pylint: disable=import-outside-toplevel, W0613:unused-argument
"""Stocks Router."""
from typing import Optional
from openbb_sdk_core.app.model.command_context import CommandContext
from openbb_sdk_core.app.model.command_output import CommandOutput
@@ -39,7 +38,7 @@ def load(
cc: CommandContext,
provider_choices: ProviderChoices,
standard_params: StandardParams,
extra_params: Optional[ExtraParams] = None,
extra_params: ExtraParams,
) -> CommandOutput[BaseModel]:
"""Load stock data for a specific ticker."""
return CommandOutput(results=Query(**locals()).execute())
@@ -50,7 +49,7 @@ def news(
cc: CommandContext,
provider_choices: ProviderChoices,
standard_params: StandardParams,
extra_params: Optional[ExtraParams] = None,
extra_params: ExtraParams,
) -> CommandOutput[BaseModel]:
"""Get news for one or more stock tickers."""
return CommandOutput(results=Query(**locals()).execute())

View File

@@ -2,7 +2,7 @@
import warnings
from dataclasses import asdict
from typing import Any, Dict, Optional
from typing import Any, Dict
from openbb_provider.provider.provider_registry import build_provider_registry
from pydantic import BaseModel
@@ -23,7 +23,7 @@ class Query:
cc: CommandContext,
provider_choices: ProviderChoices,
standard_params: StandardParams,
extra_params: Optional[ExtraParams] = None,
extra_params: ExtraParams,
) -> None:
self.cc = cc
self.provider = str(provider_choices.provider)