Skip to content
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

Style fixes for secondary_axis. #14591

Merged
merged 1 commit into from
Jun 22, 2019
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jun 20, 2019

There's a lot of unused imports :)

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

Copy link
Contributor

@afvincent afvincent left a comment

Choose a reason for hiding this comment

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

I think one could even spare the specific import from matplotlib.ticker. Otherwise, LGTM. (Hopefully CI will agree…)

(And I would curious to know where the the numerous useless imports were coming from :).)

lib/matplotlib/axes/_secondary_axes.py Outdated Show resolved Hide resolved
@@ -254,9 +235,7 @@ def draw(self, renderer=None, inframe=False):
using the converter specified by
`~.axes._secondary_axes.set_functions` (or *functions*
parameter when axes initialized.)

"""
Copy link
Contributor

Choose a reason for hiding this comment

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

By curiosity, is there a reason for removing the blank line after the docstring? It looks like the file already hosts a mix of “blank line”/“no blank line” after a docstring anyway…

Copy link
Contributor Author

@anntzer anntzer Jun 20, 2019

Choose a reason for hiding this comment

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

See PyCQA/pydocstyle#361 for how I tend to use blank lines (basically, use one if the body has other blank lines). Not really strict about that, but given that you asked, I made the changes throughout the module :)

There's a lot of unused imports :)
Copy link
Contributor

@afvincent afvincent left a comment

Choose a reason for hiding this comment

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

The remaining specific import from mticker has been removed. Fair enough for the blank lines/docstring story (I was just curious).

Approving, provided all CI tests on green.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Sorry should have cleaned up those imports!

@QuLogic QuLogic merged commit 5851ac8 into matplotlib:master Jun 22, 2019
@QuLogic QuLogic added this to the v3.2.0 milestone Jun 22, 2019
@anntzer anntzer deleted the secondaryimports branch June 22, 2019 08:53
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