Skip to content

mathtext.py style fixes. #11868

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
Aug 16, 2018
Merged

mathtext.py style fixes. #11868

merged 1 commit into from
Aug 16, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 16, 2018

The only non-trivial fix is a replacement of np.round to the builtin
round (mostly because it helps squeezing a line withing 79 chars);
np.round was introduced in 95fda79 to get consistent Py2/Py3 behavior
but Py3 matches np.round anyways (Py2's builtin round rounds halfway
away from zero, Py3's builtin round and np.round round to even).
Builtin round is faster than np.round for scalars, too (not that it
really matters).

PR Summary

PR Checklist

  • 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

The only non-trivial fix is a replacement of np.round to the builtin
round (mostly because it helps squeezing a line withing 79 chars);
np.round was introduced in 95fda79 to get consistent Py2/Py3 behavior
but Py3 matches np.round anyways (Py2's builtin round rounds halfway
away from zero, Py3's builtin round and np.round round to even).
Builtin round is faster than np.round for scalars, too (not that it
really matters).
@phobson
Copy link
Member

phobson commented Aug 16, 2018

side note: i just used python black on a library and oh man it did a good job. i realize that such blanket global changes aren't going to work with >260 PRs open. but holy cow it's impressive.

@phobson phobson merged commit ed8df70 into matplotlib:master Aug 16, 2018
@anntzer anntzer deleted the mathtext-style branch August 16, 2018 22:15
@QuLogic QuLogic modified the milestones: v3.0, v3.1 Aug 17, 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