-
Notifications
You must be signed in to change notification settings - Fork 533
STY: PEP8 style correction for all warnings, and almost all errors. Except E402, E501 and E731 #1264
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
Merged
Conversation
This file contains hidden or 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
…False:' or 'if (not) cond:'
…perator (E226) - 2nd clean up
…E127, E128 - 2nd clean up
…tions were caused by changes in tools/checkspecs.py from the previous PR nipy#1255
something about an outline | ||
fun : | ||
fun : |
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.
this change is affecting a test. the test should be updated.
@miykael - can you merge this with master now? |
Yes, but how do I do this? Do I merge my pep8StyleCorrections branch with master and than just correct any given conflict with a new commit? |
yes |
blakedewey
added a commit
that referenced
this pull request
Nov 16, 2015
STY: PEP8 style correction for all warnings, and almost all errors. Except E402, E501 and E731
Closed
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.
This PR covers the rest of PEP8 violations mentioned in #597, that were not already covered by #1255. Only exceptions are:
In my opinion, E402 cannot be corrected and E731 would be a mess to correct.
E501 can be corrected, but just needs a lot of manual correction. Therefore, I think it makes sense to correct them with another PR.
Also, there are the following PEP8 violations that I haven't corrected and I would be happy to have a feedback if they should or shouldn't be changed:
E712 comparison to False should be 'if cond is False:' or 'if not cond:'
The four errors are all in file
nipype/pipeline/plugins/base.py
, on line 235 + 236, 331 and 341. Because they compare the values of a numpy array to a boolean, we cannot replace '==' with is.W191 indentation contains tabs and E101 indentation contains mixed spaces and tabs
The six W191 and two E101 violations exist because of
nipype/utils/tests/test_cmd.py
on line 84-89, because of the tab character in filenipype/utils/nipype_cmd.py
on line 17.E116 unexpected indentation (comment)
The 5 E116 violations are caused by
nipype/interfaces/fsl/preprocess.py
on line 243-247 and I don't dare to delete this.E265 block comment should start with '# '
The 28 E265 violations are caused by multiple lines in file
doc/conf.py
, for example line 53, 73, 77, etc. I didn't add the space after#
so that it's still clear what is a comment and what is commented code.