You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flake8 would check for whitespace and lines >80 (both not caught by black in examples); currently flake8 is only used for pygmt, setup.py, and doc/conf.py.
Activity
seisman commentedon Feb 21, 2021
I don't like
flake8because it still doesn't support pyproject.toml (https://gitlab.com/pycqa/flake8/-/issues/428), but there are alternatives (e.g., https://flakehell.readthedocs.io/)weiji14 commentedon Feb 21, 2021
Funny, I was looking at
flakehelltoo last week. Droppingflake8and switching toflakehellmight allow us to get rid of thesetup.cfgfile I think. See also https://dev.to/bowmanjd/using-flake8-and-pyproject-toml-with-flakehell-1cn1seisman commentedon Feb 21, 2021
Yes!
weiji14 commentedon Feb 21, 2021
See also https://stackoverflow.com/questions/44878600/is-setup-cfg-deprecated 😄. I think it should be safe to remove
setup.cfgonce (and if) we switch fromflake8toflakehell, but need to be extra careful in case it breaks some obscure Python packaging component.seisman commentedon Feb 23, 2021
Unfortunately,
flakehellis no longer maintained.weiji14 commentedon Feb 23, 2021
Oo, that was sudden. Guess we'll need to find or wait for an alternative.
Edit: Would
autopep8help with the original whitespace issue? It also support pyproject.toml according to https://github.com/hhatto/autopep8#pyprojecttomlseisman commentedon Feb 25, 2021
As I understand it,
flake8is still the most popular and widely-used tool for style checking. I think we should still useflake8, and (1) wait for the official pyproject.toml support (https://gitlab.com/pycqa/flake8/-/issues/428); (2) see if someone forks and maintainsflakehell; (3) see if there are similar wrappers.Back to the initial issue, I think we should let
flake8check the examples. It should also fix the trailing whitespace issue in #935.To let
flake8check all examples, we need to change one single line inMakefile:pygmt/Makefile
Line 11 in e057927
and fix all warnings.
Before that, we need to discuss #962 first.
seisman commentedon Mar 19, 2021
There is an "official" fork of flakehell at https://github.com/flakehell/flakehell.