We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f945eca + 52eb8b8 commit 4b50e49Copy full SHA for 4b50e49
lib/matplotlib/backends/backend_qt5.py
@@ -121,7 +121,7 @@ def _create_qApp():
121
if display is None or not re.search(r':\d', display):
122
raise RuntimeError('Invalid DISPLAY variable')
123
124
- qApp = QtWidgets.QApplication(["matplotlib"])
+ qApp = QtWidgets.QApplication([b"matplotlib"])
125
qApp.lastWindowClosed.connect(qApp.quit)
126
else:
127
qApp = app
@@ -170,11 +170,8 @@ def wrapper(self, **kwargs):
170
QtWidgets.QWidget.__init__ = cooperative_qwidget_init
171
__init__(self, **kwargs)
172
finally:
173
- try:
174
- # Restore __init__ to sip.simplewrapper.__init__.
175
- del QtWidgets.QWidget.__init__
176
- except AttributeError:
177
- pass
+ # Restore __init__
+ QtWidgets.QWidget.__init__ = qwidget_init
178
179
return wrapper
180
0 commit comments