-
Notifications
You must be signed in to change notification settings - Fork 295
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
Fix all flake8 errors in satpy package code #515
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
djhoese
changed the title
Fix almost all flake8 errors in satpy
Fix all flake8 errors in satpy
Nov 24, 2018
stickler-ci
reviewed
Nov 24, 2018
Wow I really thought I would have gotten more than 0.06% coverage increase. |
Codecov Report
@@ Coverage Diff @@
## master #515 +/- ##
==========================================
+ Coverage 74.56% 74.62% +0.05%
==========================================
Files 136 136
Lines 18400 18342 -58
==========================================
- Hits 13720 13687 -33
+ Misses 4680 4655 -25
Continue to review full report at Codecov.
|
This was referenced Nov 25, 2018
djhoese
changed the title
Fix all flake8 errors in satpy
Fix all flake8 errors in satpy package code
Nov 25, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran
flake8 satpy
from the root of the repository and got a lot of errors. I walked through these errors and fixed all but one of them. All of them were style changes except one.The one I didn't fix is the
li_l2
reader which hasn't been migrated to xarray/dask yet. Instead of removing the failing import I added the reader to the ignored paths in setup.cfg.The only non-style change was in the mitiff writer (@TAlonglong) where there were bare except statements (
except:
). I changed these toexcept (KeyError, ValueError, RuntimeError):
to make flake8 happy and hopefully not change any functionality of the writer. @TAlonglong please verify that these exceptions are what you expected. Catching all errors by doingexcept:
orexcept Exception:
is considered bad practice.Lastly, some of these changes were just personal preference changes, but still changes that I think go along with the conventions that @pytroll/core have talked about in the past on slack. Some were also to reduce number of broken lines now that we've agreed on 120 max line length.
git diff origin/master -- "*py" | flake8 --diff