question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Regression] `flake8-eradicate==1.0.0` conflicts with `wemake-python-styleguide` under GHA

See original GitHub issue

I don’t know if this is the right repo for this issue but my best guess is that it is.

I’m using pre-commit.com too and I have an upstream flake8 hook set up. I’ve added flake8-eradicate>=1.0.0 and wemake-python-styleguide there. That seemed to work fine in local envs of developers under different OSs. But in GitHub Actions CI/CD something shady started happening, something quite unobvious and hard to debug. I suspected that some flake8 plugins misbehave but I had no idea which ones.

flake8 started failing with violations that were supposed to be ignored in the config. It wasn’t really obvious in the CI because I used the wemake formatter and it somehow didn’t show the error messages, only some lines from code. Example: https://github.com/ansible/pylibssh/runs/1566735649?check_suite_focus=true#step:11:31

I had to break into those GHA runner VMs over SSH using https://github.com/marketplace/actions/debugging-with-tmate to gather more intel! Commenting out #format = wemake revealed another unexpected detail — almost all of those error messages had error codes prefixed with a letter they weren’t supposed to use — Z. Things like these came up:

tests/conftest.py:14:1: Z101 Found nested import "pylibsshext.session"
from pylibsshext.session import Session
^
tests/conftest.py:44:9: Z111 Found bare raise outside of except "raise"        raise
        ^
tests/conftest.py:122:9: Z110 Found wrong keyword "del"
        del ssh_session  # noqa: WPS420
        ^

I’ve commented out the flake8-eradicate>=1.0.0 line and it reported no violations when the version required by wemake-python-styleguide, which is flake8-eradicate (>=0.3,<0.4) (ref https://pypi.org/pypi/wemake-python-styleguide/json), was used.

I confirmed that when I tried to re-add flake8-eradicate>=1.0.0, it started throwing errors at me again. Then, I removed the wemake-python-styleguide line keeping flake8-eradicate>=1.0.0 in place and that worked too.

STR: fork https://github.com/ansible/pylibssh/tree/55b241a001c3621d68776f244a46650bfa5590f9, stick https://github.com/ansible/pylibssh/commit/b4f27eaac023ed8164f14128c85ce97b0e3fda1c there and connect over SSH to see the env.

N.B. I have no clue why but it’s only happening under the GitHub Actions VMs and not locally (checked under CPython 3.8 and 3.9).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sobolevncommented, Feb 7, 2021
0reactions
webknjazcommented, Feb 11, 2021

Alright, this appears solved now…

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found