From 24ce6a166544b9131a631090c36bbf9b9320408b Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 5 Mar 2021 22:12:55 +0100 Subject: [PATCH 1/2] PEP8: Do not use bare 'except' --- .github/workflows/test.yml | 2 +- terminal.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12301a273e2..6e9683f6d88 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - run: bandit -r . || true - run: black --check . - run: codespell --ignore-words-list="mape" --quiet-level=2 # --skip="" - - run: flake8 . --count --ignore=E203,E302,E722,E741,F401,F841,W503 --max-line-length=140 --show-source --statistics + - run: flake8 . --count --ignore=E203,E302,E741,F401,F841,W503 --max-line-length=140 --show-source --statistics - run: mypy --ignore-missing-imports . || true - run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true - run: safety check diff --git a/terminal.py b/terminal.py index 92100a06cff..5f749b309ce 100644 --- a/terminal.py +++ b/terminal.py @@ -464,8 +464,9 @@ def main(): b_quit = pm.pred_menu( df_stock_pred, s_ticker, s_start, s_interval="1440min" ) - except: + except Exception as e: print("Either the ticker or the API_KEY are invalids. Try again!") + print(e) b_quit = False return From 2cf14fd476414dda0aa08893685cb3e4c1ba0ab7 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 6 Mar 2021 01:20:17 +0100 Subject: [PATCH 2/2] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf52a79d625..07938ca8c8a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - run: bandit -r . || true - run: black --check . - run: codespell --ignore-words-list="mape" --quiet-level=2 --skip=".git" # --skip="" - - run: flake8 . --count --ignore=E203,E302,E741,F401,F841,W503 --max-line-length=140 --show-source --statistics + - run: flake8 . --count --ignore=E203,E302,F401,F841,W503 --max-line-length=140 --show-source --statistics - run: mypy --ignore-missing-imports . || true - run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true - run: safety check