You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid calling vars() on arbitrary third-party manager_class.
vars(...) may fail if the third-party manager_class has no `__dict__`,
which can happen in contrieved cases involving `__slots__` or extension
modules, or more simply if the backend has no FigureCanvas attribute or
if the canvas class has no manager_class attribute, in which case
manager_class = None. (Note that this can only be the case if that
third-party FigureCanvas doesn't inherit from FigureCanvasBase, which is
probably not a great idea.)
In any case, instead of vars(), inspect.getattr_static does what we want
too and also handles that case.
Also replace another (unrelated) use of vars() with a plain getattr.
0 commit comments