mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
black, mypy
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
from typing import List, Literal
|
||||
|
||||
import numpy as np
|
||||
from openbb_sdk_core.app.utils import basemodel_to_df, df_to_basemodel, get_target_column, get_target_columns
|
||||
from openbb_sdk_core.app.utils import (
|
||||
basemodel_to_df,
|
||||
df_to_basemodel,
|
||||
get_target_column,
|
||||
get_target_columns,
|
||||
)
|
||||
import pandas as pd
|
||||
import pandas_ta as ta
|
||||
import statsmodels.api as sm
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
from typing import List, Literal, Optional
|
||||
from openbb_sdk_core.app.utils import basemodel_to_df, df_to_basemodel, get_target_column, get_target_columns
|
||||
from openbb_sdk_core.app.utils import (
|
||||
basemodel_to_df,
|
||||
df_to_basemodel,
|
||||
get_target_column,
|
||||
get_target_columns,
|
||||
)
|
||||
|
||||
import pandas as pd
|
||||
from builtin_extensions.common.ta import ta_helpers
|
||||
|
||||
@@ -32,6 +32,7 @@ class FMPCompanyOverviewQueryParams(CompanyOverviewQueryParams):
|
||||
The symbol of the company.
|
||||
"""
|
||||
|
||||
|
||||
class FMPCompanyOverviewData(Data):
|
||||
symbol: str
|
||||
price: float
|
||||
|
||||
@@ -41,7 +41,6 @@ class FMPCryptoPriceQueryParams(QueryParams):
|
||||
The interval of the data.
|
||||
"""
|
||||
|
||||
|
||||
symbol: str = Field(min_length=1)
|
||||
interval: Interval = Field(default=Interval.onehour)
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@ class FMPStockInsiderTradingQueryParams(StockInsiderTradingQueryParams):
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
class FMPStockInsiderTradingData(StockInsiderTradingData):
|
||||
"""FMP Stock Insider Trading data."""
|
||||
|
||||
|
||||
@@ -31,8 +31,6 @@ class FMPStockOwnershipQueryParams(StockOwnershipQueryParams):
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
class FMPStockOwnershipData(StockOwnershipData):
|
||||
"""FMP Stock Ownership data."""
|
||||
|
||||
|
||||
@@ -43,8 +43,6 @@ class PolygonMajorIndicesEODQueryParams(BaseStockQueryParams):
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
class PolygonMajorIndicesEODData(BaseStockData):
|
||||
"""Polygon major indices end of day data."""
|
||||
|
||||
|
||||
@@ -43,8 +43,6 @@ class PolygonMajorIndicesPriceQueryParams(BaseStockQueryParams):
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
class PolygonMajorIndicesPriceData(BaseStockData):
|
||||
"""Polygon major indices price data."""
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class ParametersBuilder:
|
||||
)
|
||||
|
||||
if journal_entry and journal_entry.journal_id == journal.id:
|
||||
kwargs[parameter_name] = journal_entry.output.item
|
||||
kwargs[parameter_name] = journal_entry.output.results
|
||||
else:
|
||||
raise AttributeError(
|
||||
f"Cannot find JournalEntry for the JournalQuery: {journal_query}.\n"
|
||||
|
||||
@@ -25,8 +25,10 @@ def df_to_basemodel(
|
||||
|
||||
# TODO: Move utils in common used in ta and qa to here
|
||||
|
||||
|
||||
def get_target_column(*args, **kwargs):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def get_target_columns(*args, **kwargs):
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user