mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 21:42:22 +00:00
removee optional extra_params
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user