diff --git a/bearish/database/alembic/versions/ae5d63df3c8b_add_columns.py b/bearish/database/alembic/versions/ae5d63df3c8b_add_columns.py index 8ecc6ea..af483a0 100644 --- a/bearish/database/alembic/versions/ae5d63df3c8b_add_columns.py +++ b/bearish/database/alembic/versions/ae5d63df3c8b_add_columns.py @@ -5,6 +5,7 @@ Create Date: 2024-11-28 20:41:40.572630 """ + from typing import Sequence, Union from alembic import op diff --git a/bearish/database/schemas.py b/bearish/database/schemas.py index 77aa6bd..fdd7554 100644 --- a/bearish/database/schemas.py +++ b/bearish/database/schemas.py @@ -24,8 +24,7 @@ class BaseTable(BaseBearishTable): id: Optional[int] = Field(default=None, primary_key=True) -class BaseBearishTableTest(BaseTable, table=True): - ... +class BaseBearishTableTest(BaseTable, table=True): ... class BaseFinancials(SQLModel): diff --git a/bearish/sources/alphavantage.py b/bearish/sources/alphavantage.py index f23c540..5b8badb 100644 --- a/bearish/sources/alphavantage.py +++ b/bearish/sources/alphavantage.py @@ -26,10 +26,10 @@ class AlphaVantageBase(BaseModel): __source__: str = "AlphaVantage" fundamentals: ClassVar[FundamentalData] = FundamentalData( - key=os.environ.get("ALPHAVANTAGE_API_KEY") + key=os.environ.get("ALPHAVANTAGE_API_KEY", "DUMMY") ) timeseries: ClassVar[TimeSeries] = TimeSeries( - key=os.environ.get("ALPHAVANTAGE_API_KEY") + key=os.environ.get("ALPHAVANTAGE_API_KEY", "DUMMY") ) diff --git a/bearish/sources/base.py b/bearish/sources/base.py index bc753cc..acdfa73 100644 --- a/bearish/sources/base.py +++ b/bearish/sources/base.py @@ -38,16 +38,13 @@ def read_financials(self, ticker: str) -> Financials: return Financials() @abc.abstractmethod - def _read_financials(self, ticker: str) -> Financials: - ... + def _read_financials(self, ticker: str) -> Financials: ... @abc.abstractmethod - def _read_assets(self, query: Optional[AssetQuery] = None) -> Assets: - ... + def _read_assets(self, query: Optional[AssetQuery] = None) -> Assets: ... @abc.abstractmethod - def read_series(self, ticker: str, type: str) -> List[Price]: - ... + def read_series(self, ticker: str, type: str) -> List[Price]: ... class UrlSource(BaseModel): diff --git a/bearish/sources/financedatabase.py b/bearish/sources/financedatabase.py index eea7151..0566fad 100644 --- a/bearish/sources/financedatabase.py +++ b/bearish/sources/financedatabase.py @@ -25,20 +25,16 @@ class FinanceDatabaseBase(SourceBase): } -class FinanceDatabaseEquity(FinanceDatabaseBase, Equity): - ... +class FinanceDatabaseEquity(FinanceDatabaseBase, Equity): ... -class FinanceDatabaseCrypto(FinanceDatabaseBase, Crypto): - ... +class FinanceDatabaseCrypto(FinanceDatabaseBase, Crypto): ... -class FinanceDatabaseCurrency(FinanceDatabaseBase, Currency): - ... +class FinanceDatabaseCurrency(FinanceDatabaseBase, Currency): ... -class FinanceDatabaseEtf(FinanceDatabaseBase, Etf): - ... +class FinanceDatabaseEtf(FinanceDatabaseBase, Etf): ... class FinanceDatabaseSource(DatabaseCsvSource):