tholo / pytest-flake8

pytest plugin to run flake8
Other
117 stars 47 forks source link

failes with upcoming flake8 3.8.0 #66

Closed fschulze closed 4 years ago

fschulze commented 4 years ago

With the recently released flake8 3.8.0a2 the plugin fails:

lib/python2.7/site-packages/pytest_flake8.py:191: in check_file
    app.parse_preliminary_options_and_args(args)
AttributeError: 'Application' object has no attribute 'parse_preliminary_options_and_args'
bobhy commented 4 years ago

I have a V2 of this plugin which works (at least for me) with flake8 3.7 and 3.8. It's clonable from: https://github.com/bobhy/pytest-flake8, be sure to checkout branch use_flake8_config. Note, if you try this, it depends on flake8 config file almost exclusively.

hoIIer commented 4 years ago

could we update the title to include the error? was just pulling my hair out trying to figure out why my ci/cd just started failing out of the blue with this error :)

noviluni commented 4 years ago

I just added a PR that fixed this: https://github.com/tholo/pytest-flake8/pull/68

MartinThoma commented 4 years ago

I just got this error with flake8-3.8.2 and pytest-flake8==1.0.4.

A work-around until this one is fixed seems to be to pin flake8==3.7.9

FlorianHeigl commented 4 years ago

@MartinThoma thank you so much, I got this while trying to fix a CI chain for an old project that I want to revive & port forward. I'm definitely not the right person to do that, but the one that does it. You saved me a lot of time now!

 onedns/zone.py                  53      0   100%
 ----------------------------------------------------------
 TOTAL                          334      0   100%
 ========================== 60 passed in 39.79 seconds ==========================
Running after_script
Saving cache
00:02
Uploading artifacts for successful job
00:01
 Job succeeded