From 98610bf387bd03a462c759e1b035f3dc70d31504 Mon Sep 17 00:00:00 2001 From: didier Date: Sat, 6 Mar 2021 02:49:28 +0000 Subject: [PATCH] make lint happy --- .../fundamental_analysis/alpha_vantage_api.py | 7 +++++-- terminal.py | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gamestonk_terminal/fundamental_analysis/alpha_vantage_api.py b/gamestonk_terminal/fundamental_analysis/alpha_vantage_api.py index 01d1d0117f1..ab2878f5d2f 100644 --- a/gamestonk_terminal/fundamental_analysis/alpha_vantage_api.py +++ b/gamestonk_terminal/fundamental_analysis/alpha_vantage_api.py @@ -141,8 +141,7 @@ def income_statement(l_args, s_ticker): parser = argparse.ArgumentParser( prog="incom", description=""" - Prints a complete income statement over time. This can be either quarterly or annually. - The following fields are expected: Accepted date, Cost and expenses, Cost of revenue, Depreciation and amortization, Ebitda, Ebitdaratio, Eps, Epsdiluted, Filling date, Final link, General and administrative expenses, Gross profit, Gross profit ratio, Income before tax, Income before tax ratio, Income tax expense, Interest expense, Link, Net income, Net income ratio, Operating expenses, Operating income, Operating income ratio, Other expenses, Period, Research and development expenses, Revenue, Selling and marketing expenses, Total other income expenses net, Weighted average shs out, Weighted average shs out dil [Source: Alpha Vantage]""", + Prints a complete income statement over time. This can be either quarterly or annually. The following fields are expected: Accepted date, Cost and expenses, Cost of revenue, Depreciation and amortization, Ebitda, Ebitdaratio, Eps, Epsdiluted, Filling date, Final link, General and administrative expenses, Gross profit, Gross profit ratio, Income before tax, Income before tax ratio, Income tax expense, Interest expense, Link, Net income, Net income ratio, Operating expenses, Operating income, Operating income ratio, Other expenses, Period, Research and development expenses, Revenue, Selling and marketing expenses, Total other income expenses net, Weighted average shs out, Weighted average shs out dil [Source: Alpha Vantage]""", ) parser.add_argument( @@ -230,8 +229,10 @@ def balance_sheet(l_args, s_ticker): fd = FundamentalData(key=cfg.API_KEY_ALPHAVANTAGE, output_format="pandas") if ns_parser.b_quarter: + # pylint: disable=unbalanced-tuple-unpacking df_fa, _ = fd.get_balance_sheet_quarterly(symbol=s_ticker) else: + # pylint: disable=unbalanced-tuple-unpacking df_fa, _ = fd.get_balance_sheet_annual(symbol=s_ticker) df_fa = clean_fundamentals_df(df_fa, num=ns_parser.n_num) @@ -282,8 +283,10 @@ def cash_flow(l_args, s_ticker): fd = FundamentalData(key=cfg.API_KEY_ALPHAVANTAGE, output_format="pandas") if ns_parser.b_quarter: + # pylint: disable=unbalanced-tuple-unpacking df_fa, _ = fd.get_cash_flow_quarterly(symbol=s_ticker) else: + # pylint: disable=unbalanced-tuple-unpacking df_fa, _ = fd.get_cash_flow_annual(symbol=s_ticker) df_fa = clean_fundamentals_df(df_fa, num=ns_parser.n_num) diff --git a/terminal.py b/terminal.py index 92100a06cff..4bba26606e2 100644 --- a/terminal.py +++ b/terminal.py @@ -455,6 +455,7 @@ def main(): ts = TimeSeries( key=cfg.API_KEY_ALPHAVANTAGE, output_format="pandas" ) + # pylint: disable=unbalanced-tuple-unpacking df_stock_pred, _ = ts.get_daily_adjusted( symbol=s_ticker, outputsize="full" ) @@ -464,7 +465,8 @@ def main(): b_quit = pm.pred_menu( df_stock_pred, s_ticker, s_start, s_interval="1440min" ) - except: + except Exception as e: + print(e) print("Either the ticker or the API_KEY are invalids. Try again!") b_quit = False return