Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Various backend cleanups.#15211
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -963,14 +963,12 @@ def get_renderer(self): | |||
return RendererPgf(self.figure, None, dummy=True) | |||
class FigureManagerPgf(FigureManagerBase): | |||
pass | |||
FigureManagerPgf = FigureManagerBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I wouldn't do this because you don't create aFigureManagerPgf
type with that, so that
>>> mgr = FigureManagerPgf()>>> type(mgr)<class 'FigureManagerBase'>
which is a bit confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this is consistent with FigureManagerPS, FigureManagerPDF and FigureManagerSVG, and was discussed in#9551 (review).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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.
rebased |
draw()
as ado-nothing: that's already the default in the base class.
self.figure = figure
:that's already done in the super() init.
previously documented.
PR Summary
PR Checklist