-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pep8 to pycodestyle #2941
Comments
Agreed. |
Why not flake8 as for Cartopy (cf SciTools/cartopy#970) ? |
@pp-mo Consistency is good! Based on your Cartopy ref, I assume the intent would be to fix all presented errors in the PR that adds it, (fix to clean build, in other words)? Possibly a big job! (It's been ages since I ran flake8 on Iris, and my conda environment is still downloading.) I assume you would plan for that to be Master, rather than 2.0.x? Edit: Current Flake8 wraps pycodestyle anyway, right? So technically this would also fulfill the original issue to the letter! 😉 |
I'd start by building up a list of the files to ignore, and then once merged add PRs gradually to remove the ignore files from the list (and thereby fixing those files).
yep.
The docs state so, yep: https://pycodestyle.readthedocs.io/en/latest/intro.html#related-tools One argument for consistency is that you can copy what cartopy did. We can also readily enable stickler on this repo (as we do for cartopy).
😄 Great to hear from you btw 🎉 |
You too! 🐧 Now downloading the source, as well. ;) The ignore list makes more sense from a KISS perspective. Thanks for the Cartopy references! Will look at both. |
Taking the world's laziest approach: I used the same ignores as on the Cartopy Flake8 config, and this was the output:
|
And in interesting data... I pulled pyflakes and pycodestyle from Conda, I figured it would be fresher than Mint's. I assumed that flake8 would include all pycodestyle matches, and add some more. But there are some that pycodestyle picks up and flake8 doesn't - as well as vice versa. Need to work out why that is!
F for flake, P for pycs. |
Hmm. That didn't happen in Cartopy IIRC. HIi @mo-g ! 😉 |
Hi @pp-mo ! 🐧 So far I've been running both in quiet mode just to get filename lists, since I didn't trust that this wouldn't happen. ;) I'll try running them 'normally' on a couple of test files and compare output. |
Ok, here we go:
Can confirm line 21 of Can anyone else pull flake8 and pycodestyle into an environment, and verify my result?
|
I think it's because the Iris project already has a config file for flake8 ... : https://github.com/SciTools/iris/blob/master/setup.cfg Crappy name for a config file, eh ? |
This one is because those 'F' errors are from the lint-style tests of "pyflakes", not the pep8-style checks of "pycodestyle" (which are 'E' codes) |
Actually we could rename it ".flake8". |
|
As requested, one very simple PR. ;) |
We are now testing in GitHub CI, using flake8, via Stickler-CI |
We should be moving from using
pep8
to pycodestyle.See pycodestyle PR 466 for the discussion outcome.
The text was updated successfully, but these errors were encountered: