-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Update doc strings #9279
Update doc strings #9279
Conversation
Added SecondLocator and MicrosecondLocator to the list of possible Locators. Added a sentence for DateLocator saying that it is not meant to be used on its own.
lib/matplotlib/dates.py
Outdated
@@ -793,7 +797,7 @@ def __setstate__(self, state): | |||
|
|||
class DateLocator(ticker.Locator): | |||
""" | |||
Determines the tick locations when plotting dates. | |||
Determines the tick locations when plotting dates. This class is subclassed by other Locators and is not meant to be used on its own. |
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.
Put the second line by itself. (See first sentence of https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings).
@anntzer Sorry I'm still not too familiar with this Git system. Have I now created 2 commits or will the second superseed the first automatically? |
You have two commits. You can squash them into one yourself (see squashing at https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History, probably a good thing to learn) but you can also leave it as it is and we can squash it (or not) at merge time; either way is fine. You are still running afoul of PEP8 though (https://travis-ci.org/matplotlib/matplotlib/jobs/283269976#L2977). |
Well, I didn't use Git on my computer but the online editor (simply clicking the pen symbol). So I guess squashing is not possible here? |
Sorry for the meta comment, but why not use "Squash and Merge"? |
We do use squash and merge (on a case by case basis) but we may as well try to teach the right way (tm)... In any case this looks good now. |
@jklymak Meta comments are good, we should adopt how we do things as it makes sense to. @ImportanceOfBeingErnest I took the liberty of fixing the trailing white space issue. |
Both of the issues have been style related. We run pycodestyle (with only a sub-set of the warnings / errors enabled) on travis and make sure that it passes. This seems trivial and can be a bit frustrating, but it does help to keep the code style consistent across the code base. |
Looks like there's still some whitespace somewhere that travis doesn't like. |
Trying to find the spaced which let travis not like this commit.
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.
👍 Thanks a lot! PEP8 test passes and the doc build passed before only whitespace was removed, so going to merge
Backport PR #9279 on branch v2.1.x
Updating doc strings: