FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Various backend cleanups. by anntzer · Pull Request #15211 · matplotlib/matplotlib · GitHub

Repository navigation

Various backend cleanups. - #15211

Merged
QuLogic merged 1 commit into
matplotlib:masterfrom
anntzer:backends_cleanups
Mar 14, 2020
Merged

QuLogic merged 1 commit into
matplotlib:masterfrom
anntzer:backends_cleanups

Conversation

anntzer commented Sep 7, 2019

Copy link
Copy Markdown
Contributor
  • Noninteractive backends don't need to redefine draw() as a
    do-nothing: that's already the default in the base class.
  • FigureCanvasQT doesn't need to assign self.figure = figure:
    that's already done in the super() init.
  • Use star-unpack in backend_template.
  • The list of event handlers set up by backend_wx is much bigger than
    previously documented.

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


class FigureManagerPgf(FigureManagerBase):
pass
FigureManagerPgf = FigureManagerBase

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I wouldn't do this because you don't create a FigureManagerPgf type with that, so that

>>> mgr = FigureManagerPgf()
>>> type(mgr)
<class 'FigureManagerBase'>

which is a bit confusing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

this is consistent with FigureManagerPS, FigureManagerPDF and FigureManagerSVG, and was discussed in #9551 (review).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Still not convinced this is a good approach, but accepting as precedenced.

- Noninteractive backends don't need to redefine `draw()` as a
  do-nothing: that's already the default in the base class.
- The pgf backend manager can just be an alias for FigureManagerBase:
  this is consistent with the other noninteractive backends.
- FigureCanvasQT doesn't need to assign `self.figure = figure`:
  that's already done in the super() init.
- Use star-unpack in backend_template.
- The list of event handlers set up by backend_wx is much bigger than
  previously documented.
anntzer force-pushed the backends_cleanups branch from a7223c8 to 4a9f6a8 Compare March 14, 2020 12:17

anntzer commented Mar 14, 2020

Copy link
Copy Markdown
Contributor Author

rebased

QuLogic merged commit eba349a into matplotlib:master Mar 14, 2020
QuLogic added this to the v3.3.0 milestone Mar 14, 2020
anntzer deleted the backends_cleanups branch March 14, 2020 19:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL