Skip to content

CLN: fix all flake8 warnings in pandas/tools #12082

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

Closed
wants to merge 4 commits into from

Conversation

wesm
Copy link
Member

@wesm wesm commented Jan 18, 2016

No description provided.

Keys to group by on the pivot table column.
If an array is passed, it is being used as the same manner as column values.
index : a column, Grouper, array which has the same length as data, or list
of them.
Copy link
Member

Choose a reason for hiding this comment

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

this is another numpydoc problem ...
the type specification should be on one line to have to formatted well in the html docs (as the first line after the colon is formatted in italic), and then second line is the start of the explanation

Copy link
Member

Choose a reason for hiding this comment

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

In this case, maybe just shorten it a bit? (maybe 'array which has the same length' -> 'array of same length' is enough to keep within line limit?)

But if this happens more, we should maybe look if we can solve this in the numpydoc parser

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the original versions contained commingled types and descriptions. Let me do a proper job fixing

@jorisvandenbossche
Copy link
Member

For the rest, looks good from a quick glance

@jorisvandenbossche jorisvandenbossche added the Code Style Code style, linting, code_checks label Jan 18, 2016
@jorisvandenbossche jorisvandenbossche added this to the 0.18.0 milestone Jan 18, 2016
@wesm
Copy link
Member Author

wesm commented Jan 18, 2016

Cool, I'll merge if this build passes

result['_right_indicator']),
categories=[1, 2, 3])
result[self.indicator_name] = (
result[self.indicator_name]
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally find this formatting very hard to read (though not real sure what's better)

Copy link
Member Author

Choose a reason for hiding this comment

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

A lot of these formatting issues stem from statements that are too dense. result[self.indicator_name] should be a temporary variable here, as should perhaps the list of new categories

@jreback
Copy link
Contributor

jreback commented Jan 19, 2016

lgtm

@wesm wesm closed this in faa4f7c Jan 19, 2016
@wesm wesm deleted the style/tools branch January 19, 2016 11:58
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.

3 participants