Skip to content

Commit

Permalink
fix: key
Browse files Browse the repository at this point in the history
  • Loading branch information
andoludo committed Nov 28, 2024
1 parent 1f7fc6d commit ee67e21
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2024-11-28 20:41:40.572630
"""

from typing import Sequence, Union

from alembic import op
Expand Down
3 changes: 1 addition & 2 deletions bearish/database/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions bearish/sources/alphavantage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)


Expand Down
9 changes: 3 additions & 6 deletions bearish/sources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 4 additions & 8 deletions bearish/sources/financedatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ee67e21

Please sign in to comment.