diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07938ca8c8a..c945174a54d 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,F401,F841,W503 --max-line-length=140 --show-source --statistics + - run: flake8 . --count --ignore=E203,E302,F401,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/gamestonk_terminal/sentiment/twitter_api.py b/gamestonk_terminal/sentiment/twitter_api.py index 31579279f3f..b4bc56e2b19 100644 --- a/gamestonk_terminal/sentiment/twitter_api.py +++ b/gamestonk_terminal/sentiment/twitter_api.py @@ -163,10 +163,10 @@ def inference(l_args, s_ticker): if df_tweets["sentiment_estimation"].values[-1] > 0: n_pos = df_tweets[df_tweets["prob_sen"] > 0]["prob_sen"].sum() # pylint: disable=unused-variable - n_pct = round(100 * n_pos / df_tweets["probability"].sum()) + n_pct = round(100 * n_pos / df_tweets["probability"].sum()) # noqa: F841 else: n_neg = abs(df_tweets[df_tweets["prob_sen"] < 0]["prob_sen"].sum()) - n_pct = round(100 * n_neg / df_tweets["probability"].sum()) + n_pct = round(100 * n_neg / df_tweets["probability"].sum()) # noqa: F841 # Parse tweets dt_from = dateutil.parser.parse(df_tweets["created_at"].values[-1]) diff --git a/gamestonk_terminal/technical_analysis/overlap.py b/gamestonk_terminal/technical_analysis/overlap.py index bc433b0a532..4652ad50f71 100644 --- a/gamestonk_terminal/technical_analysis/overlap.py +++ b/gamestonk_terminal/technical_analysis/overlap.py @@ -215,7 +215,7 @@ def vwap(l_args, s_ticker, s_interval, df_stock): plt.ylabel("Share Price ($)") plt.legend([s_ticker, "VWAP"]) # pylint: disable=unused-variable - axVolume = axPrice.twinx() + axVolume = axPrice.twinx() # noqa: F841 plt.bar( df_stock.index, df_stock["6. volume"].values, @@ -248,7 +248,8 @@ def vwap(l_args, s_ticker, s_interval, df_stock): plt.xlabel("Time") plt.ylabel("Share Price ($)") plt.legend([s_ticker, "VWAP"]) - axVolume = axPrice.twinx() + # pylint: disable=unused-variable + axVolume = axPrice.twinx() # noqa: F841 plt.bar( df_stock.index, df_stock["5. volume"].values, diff --git a/gamestonk_terminal/technical_analysis/volume.py b/gamestonk_terminal/technical_analysis/volume.py index 63731605174..4d59b212a52 100644 --- a/gamestonk_terminal/technical_analysis/volume.py +++ b/gamestonk_terminal/technical_analysis/volume.py @@ -79,7 +79,7 @@ def ad(l_args, s_ticker, s_interval, df_stock): plt.minorticks_on() plt.grid(b=True, which="minor", color="#999999", linestyle="-", alpha=0.2) # pylint: disable=unused-variable - axVolume = axPrice.twinx() + axVolume = axPrice.twinx() # noqa: F841 plt.bar( df_stock.index, df_stock["6. volume"].values, @@ -128,7 +128,8 @@ def ad(l_args, s_ticker, s_interval, df_stock): plt.grid(b=True, which="major", color="#666666", linestyle="-") plt.minorticks_on() plt.grid(b=True, which="minor", color="#999999", linestyle="-", alpha=0.2) - axVolume = axPrice.twinx() + # pylint: disable=unused-variable + axVolume = axPrice.twinx() # noqa: F841 plt.bar( df_stock.index, df_stock["5. volume"].values, @@ -203,7 +204,7 @@ def obv(l_args, s_ticker, s_interval, df_stock): plt.minorticks_on() plt.grid(b=True, which="minor", color="#999999", linestyle="-", alpha=0.2) # pylint: disable=unused-variable - axVolume = axPrice.twinx() + axVolume = axPrice.twinx() # noqa: F841 plt.bar( df_stock.index, df_stock["6. volume"].values, @@ -237,7 +238,8 @@ def obv(l_args, s_ticker, s_interval, df_stock): plt.grid(b=True, which="major", color="#666666", linestyle="-") plt.minorticks_on() plt.grid(b=True, which="minor", color="#999999", linestyle="-", alpha=0.2) - axVolume = axPrice.twinx() + # pylint: disable=unused-variable + axVolume = axPrice.twinx() # noqa: F841 plt.bar( df_stock.index, df_stock["5. volume"].values,