-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Auto flake #1741
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
Auto flake #1741
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ install: | |
script: | ||
- python -OO -c "import xarray" | ||
- py.test xarray --cov=xarray --cov-config ci/.coveragerc --cov-report term-missing --verbose $EXTRA_FLAGS | ||
- git diff upstream/master **/*py | flake8 --diff --exit-zero || true | ||
- flake8 -j auto xarray | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: do we want to have travis fail when flake8 finds something awry? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO yes; it's the only way to keep flake8 passing. |
||
|
||
after_success: | ||
- coveralls |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,25 @@ universal = 1 | |
python_files=test_*.py | ||
|
||
[flake8] | ||
max-line-length=79 | ||
# References: | ||
# https://flake8.readthedocs.io/en/latest/user/configuration.html | ||
# https://flake8.readthedocs.io/en/latest/user/error-codes.html | ||
|
||
# Note: there cannot be spaces after comma's here | ||
exclude = __init__.py | ||
ignore = | ||
# Extra space in brackets | ||
E20, | ||
# Multiple spaces around "," | ||
E231,E241, | ||
# Comments | ||
E26, | ||
# Import formatting | ||
E4, | ||
# Comparing types instead of isinstance | ||
E721, | ||
# Assigning lambda expression | ||
E731, | ||
# Ambiguous variable names | ||
E741 | ||
max-line-length = 120 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's leave this as the default (79 per PEP8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of replacing this, I'd actually enforce that the diff must be flake8-clean:
And then add a second check that covers all files but ignores some errors in existing code:
Which means that the config section can (needs to be) be left as-is.