Skip to content
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

Some minor errors in repo / flake8 #2990

Closed
max-sixty opened this issue May 24, 2019 · 2 comments
Closed

Some minor errors in repo / flake8 #2990

max-sixty opened this issue May 24, 2019 · 2 comments

Comments

@max-sixty
Copy link
Collaborator

Currently we use pycodestyle:

pycodestyle xarray ;

I think we used to use flake8. I can't find / remember the reason we moved to pycodestyle.

master has some non-trivial issues that flake would catch, including a test overwritting another and undefined variables:

flake8 xarray --ignore=I,W503,W504,F401,E265,E402

xarray/core/options.py:62:8: F632 use ==/!= to compare str, bytes, and int literals
xarray/core/dataset.py:4148:69: F821 undefined name 'dim'
xarray/backends/netCDF4_.py:177:12: F632 use ==/!= to compare str, bytes, and int literals
xarray/tests/test_dataarray.py:1264:9: F841 local variable 'foo' is assigned to but never used
xarray/tests/test_dataarray.py:1270:18: F821 undefined name 'x'
xarray/tests/test_dataarray.py:1301:5: F811 redefinition of unused 'test_reindex_fill_value' from line 1262
xarray/tests/test_dataarray.py:1647:16: F632 use ==/!= to compare str, bytes, and int literals
xarray/tests/test_dataarray.py:1648:16: F632 use ==/!= to compare str, bytes, and int literals
xarray/tests/test_dataset.py:4759:8: F632 use ==/!= to compare str, bytes, and int literals
xarray/tests/test_dataset.py:4761:10: F632 use ==/!= to compare str, bytes, and int literals
xarray/tests/test_distributed.py:62:9: F811 redefinition of unused 'loop' from line 12
xarray/tests/test_distributed.py:92:9: F811 redefinition of unused 'loop' from line 12
xarray/tests/test_distributed.py:117:49: F811 redefinition of unused 'loop' from line 12
xarray/tests/test_distributed.py:141:53: F811 redefinition of unused 'loop' from line 12
xarray/tests/test_distributed.py:152:51: F811 redefinition of unused 'loop' from line 12

Happy to fix these in a PR. For ensuring these don't crop up again, any objection to flake8?

@shoyer
Copy link
Member

shoyer commented May 25, 2019

I would be very happy to switch back to flake8, but we should also switch pep8speaks to use flake8, too, which it now supports!

@max-sixty
Copy link
Collaborator Author

Closed by #3010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants