8000 Various cleanups. by anntzer · Pull Request #12050 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Various cleanups. #12050

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

Various cleanups. #12050

merged 1 commit into from
Sep 7, 2018

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Sep 6, 2018
  • Document that in margins(), tight can be None, which is different
    from False (it keeps the previous setting).
  • Conversely, in two places, don't check for 'is True / is False', but
    just for normal truthiness. In particular, for the check on
    get_clip_on(), this is consistent with the check in
    Artist.get_tightbbox(). (Note that there are plently of other is True / is False checks in the codebase but they arise because the
    variable can also take some other values, e.g. a string or None.)
  • Fix a docstring.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

@@ -45,13 +45,17 @@
# FONTS

def get_unicode_index(symbol, math=True):
"""get_unicode_index(symbol, [bool]) -> integer
r"""
Return the integer index (from the Unicode table) of *symbol*
Copy link
Member

Choose a reason for hiding this comment

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

Period at the end.

----------
symbol : str
A single unicode character, a TeX command (e.g. r'\pi') or a Type1
symbol name (e.g. 'phi')
Copy link
Member

Choose a reason for hiding this comment

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

Period.

- Document that in `margins()`, `tight` can be None, which is different
  from False (it keeps the previous setting).
- Conversely, in two places, don't check for 'is True / is False', but
  just for normal truthiness.  In particular, for the check on
  `get_clip_on()`, this is consistent with the check in
  `Artist.get_tightbbox()`.  (Note that there are plently of other `is
  True` / `is False` checks in the codebase but they arise because the
  variable can also take some other values, e.g. a string or None.)
- Fix a docstring.
@anntzer
Copy link
Contributor Author
anntzer commented Sep 6, 2018

comments handled

Copy link
Member
@NelleV NelleV left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @anntzer

@NelleV NelleV merged commit 6deccc4 into matplotlib:master Sep 7, 2018
@anntzer anntzer deleted the cleanups branch September 7, 2018 18:57
@QuLogic QuLogic added this to the v3.1 milestone Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0