Skip to content

FIX: PEP8 correction for all error E100-E399 #1255

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
merged 36 commits into from
Oct 28, 2015
Merged

Conversation

miykael
Copy link
Collaborator

@miykael miykael commented Oct 17, 2015

This PR covers part of the PEP8 violations mentioned in #597. Almost all of them were done with autopep8, by using the following code:

pep8ID=E303

for f in `find . -name "*.py"`
do
    if [[ "$f" != *"test_auto"* ]]
    then

        count=`pep8 --select $pep8ID $f | wc -l`

        if [ "$count" -ne "0" ]
        then
            autopep8 -i --select $pep8ID $f
            pep8 --select $pep8ID $f
        fi
    fi
done

I've only adjusted a few spaces and indentations, where autopep8 couldn't solve the problem. And any files with "test_auto" were ignored during the correction.

@miykael
Copy link
Collaborator Author

miykael commented Oct 19, 2015

I'm not sure how to tackle the circleci and travis test fails. Are there any problems with my commits? And what can I do to facilitate the merging?

@miykael
Copy link
Collaborator Author

miykael commented Oct 19, 2015

Ah, I see. Thanks @chrisfilo. I think this is because it compares it to the auto generated code from nipype/utils/nipype_cmd.py. Should I know change my code or the file nipype/utils/nipype_cmd.py?

I'm still struggling with github modifications. How can I easly change a file in a specific commit?

@chrisgorgo
Copy link
Member

I would just revert the problematic lines of the test code in a new commit.
On Oct 19, 2015 16:15, "Michael Notter" [email protected] wrote:

Ah, I see. Thanks @chrisfilo https://github.com/chrisfilo. I think this
is because it compares it to the auto generated code from
nipype/utils/nipype_cmd.py
https://github.com/nipy/nipype/blob/master/nipype/utils/nipype_cmd.py#L16.
Should I know change my code or the file nipype/utils/nipype_cmd.py?

I'm still struggling with github modifications. How can I easly change a
file in a specific commit?


Reply to this email directly or view it on GitHub
#1255 (comment).

@oesteban
Copy link
Contributor

I'd propose to add your script to the make target check-before-commit. This way we can have PEP8 violations under control in the long term. What do you think?. How this PR coordinates with the new Python 3 integration, @satra ?

@satra
Copy link
Member

satra commented Oct 19, 2015

@oesteban - i think this PR is being done on top of the merged py3 refactor.

@miykael
Copy link
Collaborator Author

miykael commented Oct 20, 2015

Yes, the PR is on top of the merged py3 refactor. I've tried to be as fast as possible with the PEP8 corrections to make sure that it doesn't interfere with to many other PR.

@oesteban, I'm not sure if it's the best idea to put the pep8 check or autopep8 into check-before-commit. There might be some PEP8 errors or warnings that perhaps shouldn't be corrected. At least not for now. It might be an idea to look at it again, once most PEP8 issues are taken care of?

@chrisgorgo
Copy link
Member

I'm happy merging it the way it is (also worried we will have to wait a long time for everyone to rebase their PRs).

@miykael
Copy link
Collaborator Author

miykael commented Oct 21, 2015

What would be the best way to tackle the remaining PEP issues? Having many small PRs or one big one containing all remaining corrections?
And what would be the best time point? Now or perhaps better just after a release?

@blakedewey
Copy link
Contributor

Have we decided to merge this? I think now would be better than later. As many files will begin conflicting.

satra added a commit that referenced this pull request Oct 28, 2015
FIX: PEP8 correction for all error E100-E399
@satra satra merged commit d1bada6 into nipy:master Oct 28, 2015
@satra
Copy link
Member

satra commented Oct 28, 2015

merging this. we will open a separate PR for the remaining PEP8s.

miykael added a commit to miykael/nipype that referenced this pull request Nov 1, 2015
…tions were caused by changes in tools/checkspecs.py from the previous PR nipy#1255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants