Skip to content

Deprecate Artist.onRemove, Artist.hitlist. #9825

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 3, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Nov 21, 2017

Artist.onRemove is unused and untested; it could (should?) have been
deprecated at the same time as Artist.onHilite (#3988).

Artist.hitlist is only used in one example which I rewrote in a more
efficient manner (no need to test every artist for containment), and can
be easily replaced by a list comprehension (except for the
Exception-silencing part, which is probably misguided to start with...).

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

@dstansby dstansby added this to the v2.2 milestone Nov 22, 2017
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

👍 to deprecation, needs api_changes docs

@anntzer
Copy link
Contributor Author

anntzer commented Nov 23, 2017

Pfff, you got away without one in #3988 :-)
no worries, it's coming...

Artist.onRemove is unused and untested; it could (should?) have been
deprecated at the same time as Artist.onHilite.

Artist.hitlist is only used in one example which I rewrote in a more
efficient manner (no need to test every artist for containment), and can
be easily replaced by a list comprehension (except for the
Exception-silencing part, which is probably misguided to start with...).
@tacaswell tacaswell merged commit 6336f2d into matplotlib:master Dec 3, 2017
@tacaswell
Copy link
Member

@anntzer We should always strive to do better

@anntzer anntzer deleted the more-deprecations branch December 3, 2017 01:50
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 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.

5 participants