Skip to content

CLN: fix all flake8 warnings in pandas/tseries #12075

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 1 commit into from

Conversation

wesm
Copy link
Member

@wesm wesm commented Jan 18, 2016

No description provided.

@@ -26,7 +25,7 @@ def strftime(self, date_format):
Return an array of formatted strings specified by date_format, which
supports the same string format as the python standard library. Details
of the string format can be found in the `python string format doc
<https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior>`__
https://docs.python.org/2/library/datetime.html.
Copy link
Member

Choose a reason for hiding this comment

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

This will give an error with Sphinx, as you left in the opening ```.
But I personally also find the original link 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.

This is hard, because there's no easy way (AFAICT, manual string concatenation is all I could think of) to keep the RST valid while also suppressing the flake8 warning. I fixed the broken markup for now. I've always felt that docstrings should be optimized for console use, and that more complex documentation should be in the docs themselves, but it's not a big deal either way

Copy link
Member

Choose a reason for hiding this comment

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

Well, this is a case where 'A Foolish Consistency is the Hobgoblin of Little Minds' would apply I think, but the problem is that a #noqa does not really work in a docstring .. (for the sphinx output at least)

@jorisvandenbossche
Copy link
Member

Looks good from a quick glance! (and for the diffs I could see)

@wesm
Copy link
Member Author

wesm commented Jan 18, 2016

Cool, I can merge after Travis passes if we're all good

@wesm
Copy link
Member Author

wesm commented Jan 18, 2016

If someone can +1 this and also review #12082 I can merge both of those

@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

I fixed it!

@@ -35,6 +35,7 @@ class TimeGrouper(Grouper):
Use begin, end, nperiods to generate intervals that cannot be derived
directly from the associated object
Copy link
Contributor

Choose a reason for hiding this comment

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

if you wouldn't mind removing tseries/resample.py from this patch as I mostly rewritten this file in #11841 (I will PEP that itself).

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure thing

@jreback
Copy link
Contributor

jreback commented Jan 19, 2016

lgtm otherwise

@wesm
Copy link
Member Author

wesm commented Jan 19, 2016

@jreback I nixed the resample.py diff, will merge when the build passes

@wesm
Copy link
Member Author

wesm commented Jan 19, 2016

Cherry-picked in 1acdb31

@wesm wesm closed this Jan 19, 2016
@wesm wesm deleted the style/tseries branch January 19, 2016 20:06
@jreback
Copy link
Contributor

jreback commented Jan 19, 2016

merge away

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