Skip to content

Update doc strings - #9279

Merged
dstansby merged 5 commits into
matplotlib:masterfrom
ImportanceOfBeingErnest:patch-2
Oct 9, 2017
Merged

dstansby merged 5 commits into
matplotlib:masterfrom
ImportanceOfBeingErnest:patch-2

Conversation

@ImportanceOfBeingErnest

@ImportanceOfBeingErnest ImportanceOfBeingErnest commented Oct 4, 2017 •

Copy link
Copy Markdown
Member

Updating doc strings:

  • 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.

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.
Comment thread lib/matplotlib/dates.py Outdated
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.

Copy link
Copy Markdown
Contributor

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).

@ImportanceOfBeingErnest

Copy link
Copy Markdown
Member Author

@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?

@anntzer

anntzer commented Oct 4, 2017

Copy link
Copy Markdown
Contributor

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).

@ImportanceOfBeingErnest

Copy link
Copy Markdown
Member Author

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?
I thought this was a small, quick fix, now it turns out several people have to work on it for hours. :-( Sorry for that.

@jklymak

jklymak commented Oct 4, 2017

Copy link
Copy Markdown
Member

Sorry for the meta comment, but why not use "Squash and Merge"?

@anntzer

anntzer commented Oct 4, 2017 •

Copy link
Copy Markdown
Contributor

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.

@tacaswell

Copy link
Copy Markdown
Member

@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.

@tacaswell

Copy link
Copy Markdown
Member

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.

@tacaswell tacaswell added this to the 2.1.1 (next bug fix release) milestone Oct 5, 2017
@dstansby

dstansby commented Oct 8, 2017

Copy link
Copy Markdown
Member

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.

@dstansby dstansby left a comment

Copy link
Copy Markdown
Member

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

@dstansby
dstansby merged commit c166fa1 into matplotlib:master Oct 9, 2017
lumberbot-app Bot pushed a commit that referenced this pull request Oct 9, 2017
dstansby added a commit that referenced this pull request Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants