diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c4871940c9..19f6b216a85 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" - - run: flake8 . --count --ignore=E203,E302,F401,W503 --max-line-length=122 --show-source --statistics + - run: flake8 . --count --ignore=E203,W503 --max-line-length=122 --show-source --statistics - run: mypy --ignore-missing-imports . - run: shopt -s globstar && pyupgrade --py36-plus **/*.py - run: safety check diff --git a/gamestonk_terminal/__init__.py b/gamestonk_terminal/__init__.py index 956f28044c0..f46858e0d22 100644 --- a/gamestonk_terminal/__init__.py +++ b/gamestonk_terminal/__init__.py @@ -1,3 +1,4 @@ +# flake8: noqa from . import discovery from . import due_diligence from . import fundamental_analysis diff --git a/gamestonk_terminal/discovery/__init__.py b/gamestonk_terminal/discovery/__init__.py index ba57b205c78..a1605dd4a10 100644 --- a/gamestonk_terminal/discovery/__init__.py +++ b/gamestonk_terminal/discovery/__init__.py @@ -1 +1 @@ -from . import disc_menu +from . import disc_menu # noqa: F401 diff --git a/gamestonk_terminal/papermill/__init__.py b/gamestonk_terminal/papermill/__init__.py index 0064b647e8f..857291ab8fb 100644 --- a/gamestonk_terminal/papermill/__init__.py +++ b/gamestonk_terminal/papermill/__init__.py @@ -1 +1 @@ -from . import papermill_menu +from . import papermill_menu # noqa: F401 diff --git a/tests/test_dd_financial_modeling_prep_api.py b/tests/test_dd_financial_modeling_prep_api.py index 952cf96cb72..952fecdfb73 100644 --- a/tests/test_dd_financial_modeling_prep_api.py +++ b/tests/test_dd_financial_modeling_prep_api.py @@ -1,10 +1,6 @@ """ fundamental_analysis/business_insider_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - from gamestonk_terminal.due_diligence.financial_modeling_prep_api import rating diff --git a/tests/test_dd_finviz_api.py b/tests/test_dd_finviz_api.py index 864398ec85b..b0e1e680b2e 100644 --- a/tests/test_dd_finviz_api.py +++ b/tests/test_dd_finviz_api.py @@ -1,10 +1,6 @@ """ due_diligence/finviz_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - from gamestonk_terminal.due_diligence.finviz_api import analyst diff --git a/tests/test_discovery_fidelity_api.py b/tests/test_discovery_fidelity_api.py index ab9d0aebe5c..ec06fe607db 100644 --- a/tests/test_discovery_fidelity_api.py +++ b/tests/test_discovery_fidelity_api.py @@ -1,10 +1,6 @@ """ discovery/fidelity_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - from gamestonk_terminal.discovery.fidelity_api import ( buy_sell_ratio_color_red_green, price_change_color_red_green, diff --git a/tests/test_discovery_short_interest_api.py b/tests/test_discovery_short_interest_api.py index 1ce8031a366..4fb72201814 100644 --- a/tests/test_discovery_short_interest_api.py +++ b/tests/test_discovery_short_interest_api.py @@ -1,10 +1,6 @@ """ discovery/short_interest_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - from gamestonk_terminal.discovery.short_interest_api import ( high_short_interest, low_float, diff --git a/tests/test_fa_business_insider_api.py b/tests/test_fa_business_insider_api.py index 3acb98dc937..35d7c23205c 100644 --- a/tests/test_fa_business_insider_api.py +++ b/tests/test_fa_business_insider_api.py @@ -1,10 +1,6 @@ """ fundamental_analysis/business_insider_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - from gamestonk_terminal.fundamental_analysis.business_insider_api import management diff --git a/tests/test_fa_market_watch_api.py b/tests/test_fa_market_watch_api.py index 2a001731541..25edfa89b12 100644 --- a/tests/test_fa_market_watch_api.py +++ b/tests/test_fa_market_watch_api.py @@ -1,10 +1,6 @@ """ fundamental_analysis/market_watch_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - from gamestonk_terminal.fundamental_analysis.market_watch_api import income diff --git a/tests/test_fa_yahoo_finance_api.py b/tests/test_fa_yahoo_finance_api.py index 88229c9c2fd..211c2f006d4 100644 --- a/tests/test_fa_yahoo_finance_api.py +++ b/tests/test_fa_yahoo_finance_api.py @@ -1,12 +1,8 @@ """ fundamental_analysis/yahoo_finance_api.py tests """ -# noqa: F401 import unittest # pylint: disable=unused-import -import pytest - -# pylint: disable=unused-import -from gamestonk_terminal.fundamental_analysis.yahoo_finance_api import ( +from gamestonk_terminal.fundamental_analysis.yahoo_finance_api import ( # noqa: F401 info, sustainability, calendar_earnings, diff --git a/tests/test_pred_neural_networks.py b/tests/test_pred_neural_networks.py index b033bc15642..0eeb5a42fd5 100644 --- a/tests/test_pred_neural_networks.py +++ b/tests/test_pred_neural_networks.py @@ -1,10 +1,6 @@ """ fundamental_analysis/yahoo_finance_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - try: from gamestonk_terminal.prediction_techniques.neural_networks import mlp except ModuleNotFoundError as e: diff --git a/tests/test_sentiment_reddit_api.py b/tests/test_sentiment_reddit_api.py index 043b32492ee..f2d25fbe635 100644 --- a/tests/test_sentiment_reddit_api.py +++ b/tests/test_sentiment_reddit_api.py @@ -1,10 +1,6 @@ """ discovery/short_interest_api.py tests """ -# noqa: F401 import unittest -# pylint: disable=unused-import -import pytest - from gamestonk_terminal.sentiment.reddit_api import popular_tickers diff --git a/tests/test_sentiment_twitter_api.py b/tests/test_sentiment_twitter_api.py index 7c62efc92f2..84d55c761ab 100644 --- a/tests/test_sentiment_twitter_api.py +++ b/tests/test_sentiment_twitter_api.py @@ -3,8 +3,6 @@ import unittest # pylint: disable=unused-import -import pytest - try: from gamestonk_terminal.sentiment.twitter_api import inference, sentiment except ModuleNotFoundError as e: