Skip to content

cbook docs cleanup #14267

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
Jun 18, 2019
Merged

cbook docs cleanup #14267

merged 1 commit into from
Jun 18, 2019

Conversation

timhoffm
Copy link
Member

PR Summary

Some random docstring cleanup.

@timhoffm timhoffm added this to the v3.1.1 milestone May 19, 2019
@@ -1617,17 +1645,17 @@ def normalize_kwargs(kw, alias_mapping=None, required=(), forbidden=(),
If an Artist subclass or instance is passed, use its properties alias
mapping.

required : iterable, optional
A tuple of fields that must be in kwargs.
required : list of str, optional
Copy link
Member

Choose a reason for hiding this comment

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

These don't have to be lists, any non-generator iterable will work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would leave that. non-generator iterable of str feels a bit too bulky. The essence that it's a homogeneous sequence of str is best described by list of str. I find it ok to accept a slightly broader range of types than documented in this case.

Note: I searched through the code to find out how it's actually used and found out that neither of required, forbidden and allowed are used anywhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that list is the "practical" documentation.
Unless we have concrete plans to use required/forbidden/allowed I would suggest just deprecating them. IIRC @tacaswell you wrote this helper originally; thoughts?

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

Two minor comments, but 👍 to merge without them being addressed.

@timhoffm timhoffm force-pushed the doc-cbook branch 2 times, most recently from 448b5c3 to 86d670f Compare June 10, 2019 09:47
@tacaswell tacaswell modified the milestones: v3.1.1, v3.1.2 Jun 10, 2019
homogeneous list of a given type
A list with a short ``repr()``.

This is meant to be used for a homogeneous list of a given type. In
Copy link
Contributor

Choose a reason for hiding this comment

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

"This is meant to be used for homogeneous lists of artists, so that they don't cause long, meaningless outputs [at the REPL]".

@anntzer anntzer merged commit f68b4ea into matplotlib:master Jun 18, 2019
@timhoffm timhoffm deleted the doc-cbook branch June 25, 2019 22:43
@QuLogic
Copy link
Member

QuLogic commented Jul 17, 2019

@meeseeksdev backport to v3.1.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jul 17, 2019

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.1.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 f68b4ea6bc3f4abe7971aed722ad11250de4f3c5
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #14267: cbook docs cleanup'
  1. Push to a named branch :
git push YOURFORK v3.1.x:auto-backport-of-pr-14267-on-v3.1.x
  1. Create a PR against branch v3.1.x, I would have named this PR:

"Backport PR #14267 on branch v3.1.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

@QuLogic
Copy link
Member

QuLogic commented Jul 17, 2019

I'm not going to go through the trouble of backporting this. Feel free to do so if you wish.

@timhoffm
Copy link
Member Author

Probably too much going on currently. I think I'm giving up on backporting doc changes to 3.1.2. Hopefully 3.2.0 won't be much later than 3.1.2.

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.

4 participants