This PR fixes all the issues that were found. It also adds a pre-commit config which you can use by doing:
pip install pre-commit
pre-commit install
With this, linting is automatically done when you make a commit and if it finds anything you won't be able to commit until you fix the issues.
The config is relatively limited right now for a couple reasons:
I usually use the "black" autoformatter but didn't want to for SIFT until we've combined the EUMETSAT code more thoroughly since it is going to cause unnecessarily difficult merge conflicts.
I usually have "isort" for sorting imports automatically. Didn't do it for the same reason as not using black.
I disabled checking docstrings with flake8-docstrings since it would take years to update all the docstrings in SIFT. I've disabled checking them by including ignore = D, in the setup.cfg under the flake8 section.
While working on CI stuff I added automatic linting of the code. This found a lot of issues. You can run it locally with:
This PR fixes all the issues that were found. It also adds a pre-commit config which you can use by doing:
With this, linting is automatically done when you make a commit and if it finds anything you won't be able to commit until you fix the issues.
The config is relatively limited right now for a couple reasons:
flake8-docstrings
since it would take years to update all the docstrings in SIFT. I've disabled checking them by includingignore = D,
in thesetup.cfg
under theflake8
section.