Skip to content

Misc. cleanups. #12956

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
Dec 9, 2018
Merged

Misc. cleanups. #12956

merged 1 commit into from
Dec 9, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 9, 2018

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

@anntzer anntzer added this to the v3.1 milestone Dec 9, 2018
@@ -657,7 +657,7 @@ def set_data(self, *args):
*args : (N, 2) array or two 1D arrays
"""
if len(args) == 1:
x, y = args[0]
(x, y), = args
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if that's really better in this context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer this form as it's immediately clear that you're not dropping anything from args, i.e. that single line also asserts that args has length 1. (Yes, it's redundant with the line just above, but I still think it helps the readability.)

@tacaswell tacaswell merged commit 2507f2c into matplotlib:master Dec 9, 2018
@anntzer anntzer deleted the cleanups branch December 9, 2018 19:07
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.

3 participants