From 9186d8734f1bc561ff50bfee129ea04edddc58a2 Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Sun, 28 Nov 2021 17:10:00 +0100 Subject: [PATCH] fixed type hints --- src/mwfin/functions.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mwfin/functions.py b/src/mwfin/functions.py index 2d03225..f8f29ce 100644 --- a/src/mwfin/functions.py +++ b/src/mwfin/functions.py @@ -91,7 +91,7 @@ async def _get_financial_statement(statement: str, ticker_symbol: str, quarterly async def get_balance_sheet(*ticker_symbols: str, quarterly: bool = False, - session: ClientSession = None) -> ResultDict: + session: ClientSession = None) -> Union[ResultDict, Dict[str, ResultDict]]: """ Returns data from the balance sheet of the specified company. """ @@ -104,7 +104,7 @@ async def get_balance_sheet(*ticker_symbols: str, quarterly: bool = False, async def get_income_statement(*ticker_symbols: str, quarterly: bool = False, - session: ClientSession = None) -> ResultDict: + session: ClientSession = None) -> Union[ResultDict, Dict[str, ResultDict]]: """ Returns data from the income statement of the specified company. """ @@ -117,7 +117,7 @@ async def get_income_statement(*ticker_symbols: str, quarterly: bool = False, async def get_cash_flow_statement(*ticker_symbols: str, quarterly: bool = False, - session: ClientSession = None) -> ResultDict: + session: ClientSession = None) -> Union[ResultDict, Dict[str, ResultDict]]: """ Returns data from the cash flow statement of the specified company. """ @@ -130,7 +130,8 @@ async def get_cash_flow_statement(*ticker_symbols: str, quarterly: bool = False, async def get_company_financials(*ticker_symbols: str, quarterly: bool = False, - session: ClientSession = None) -> Dict[str, ResultDict]: + session: ClientSession = None) -> Union[Dict[str, ResultDict], + Dict[str, Dict[str, ResultDict]]]: """ Returns all fundamentals (balance sheet, income statement and cash flow statement) of the specified company. """