Skip to content

WIP/PEP8: pandas/core #11945

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 1 commit into from
Jan 4, 2016
Merged

WIP/PEP8: pandas/core #11945

merged 1 commit into from
Jan 4, 2016

Conversation

rockg
Copy link
Contributor

@rockg rockg commented Jan 3, 2016

xref #11928

Putting this out there as a start. Will add to this over the next couple of days.

@jreback
Copy link
Contributor

jreback commented Jan 3, 2016

just merged: #11941

will show the linting effect in travis (though not fail because of it).

FYI, I have found autopep8 does a pretty good job (though doesn't fix long lines)

@jreback
Copy link
Contributor

jreback commented Jan 3, 2016

I am also ok with doing this in sections (3 files sounds about right). So when one is ready to go. pls ping.

@jreback jreback added the Code Style Code style, linting, code_checks label Jan 3, 2016
@jreback jreback added this to the 0.18.0 milestone Jan 3, 2016
@rockg rockg force-pushed the pep8 branch 2 times, most recently from f9419df to d980794 Compare January 3, 2016 18:50
@rockg
Copy link
Contributor Author

rockg commented Jan 3, 2016

green...there are still a few E731 lambda should be def, but substantially better than before.

@@ -345,7 +352,8 @@ def _gotitem(self, key, ndim, subset=None):
"""
raise AbstractMethodError(self)

_agg_doc = """Aggregate using input function or dict of {column -> function}
_agg_doc = """Aggregate using input function or dict of {column ->
function}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should not be a indentation here I think

@jorisvandenbossche
Copy link
Member

@rockg can you specify what you exactly did? Is this the result of an automated tool (autopep8), or from manual clean-up?
Because I not fully 'happy' with all style changes, but if it is the result of a tool, then it will be probably easier to just accept the particular style of that tool (as style will always be something subjective).

Apart from that I put some comments of things that are not subjective.

@rockg
Copy link
Contributor Author

rockg commented Jan 3, 2016

Manual with the aid of editor defaults for line continuation, etc. I'm happy to go through and change any persistent issues, but my main goal here was to result in no output from flake8.

@rockg
Copy link
Contributor Author

rockg commented Jan 3, 2016

As 90% of the issues are long-lines and autopep8 doesn't do that I felt it was easier to do manually.

@kawochen
Copy link
Contributor

kawochen commented Jan 3, 2016

--max-line-length 79 as an option to autopep8

@jreback
Copy link
Contributor

jreback commented Jan 3, 2016

that reminds me - we should recommend autopep8

any way to setup default options? like we do for flake8

@TomAugspurger
Copy link
Contributor

Looks like it

  --ignore-local-config
                        don't look for and apply local config files; if not
                        passed, defaults are updated with any config files in
                        the project's root directory

it seem to look for a file called .pep8 https://github.com/hhatto/autopep8/blob/9eb1121f357077c7d71fc770e25d3678f906a401/autopep8.py#L122

@rockg
Copy link
Contributor Author

rockg commented Jan 3, 2016

Yes, seems that it does. I was only going on the comment above. Is it in such a state to use autopep8 for this set or only do that for future ones?

@rockg
Copy link
Contributor Author

rockg commented Jan 4, 2016

For eventual continuity with the rest of the source, I'll use autopep8 and repush.

@jreback
Copy link
Contributor

jreback commented Jan 4, 2016

can u add in the config file for autopep8 as well

jreback added a commit that referenced this pull request Jan 4, 2016
@jreback jreback merged commit 762f488 into pandas-dev:master Jan 4, 2016
@jreback
Copy link
Contributor

jreback commented Jan 4, 2016

thanks @rockg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants