Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Changed docstrings in Text #11513

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 26, 2018
Merged

Changed docstrings in Text #11513

merged 1 commit into from
Jun 26, 2018

Conversation

fredrik-1
Copy link
Contributor

It was still a small problem with Text aliases. fontname is just a one way alias of fontfamily and the options for fontname dissapeared in the kwarg list. This pr make both fontname and fontfamily appear in the kwarg lists with accepted values and the information about the alias behavior are in the docstrings.

I also went through the docstrings and changed some formatting.

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Returns True or False.
Returns
-------
bool : bool
Copy link
Member

Choose a reason for hiding this comment

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

with returns, you don't necessarily have to use this syntax. You could also write:

Returns
-------
bool

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can but it often looks ugly, because it get bold and not formatted like for example here.

I am not sure if it is a bug in numpydocs because the documentation says that the return name is optional but the type is rendered as a name (bold) when the name is omitted.


Parameters
----------
rectprops : FancyBboxPatch prop dict
rectprops : dict with properties for `.patches.FancyBboxPatch`
Copy link
Member

Choose a reason for hiding this comment

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

👍

@NelleV
Copy link
Member

NelleV commented Jun 26, 2018

Thanks @fredrik-1 !

@NelleV NelleV merged commit 65158f9 into matplotlib:master Jun 26, 2018
@QuLogic QuLogic added this to the v3.0 milestone Jun 26, 2018
@fredrik-1 fredrik-1 deleted the doc_text branch June 27, 2018 13:36
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