From a703155a21f455469839324745aa4e565a3f29d4 Mon Sep 17 00:00:00 2001 From: Kenneth Lyons Date: Sat, 11 Apr 2020 20:15:00 -0700 Subject: [PATCH] Replace default list arg with None --- pyqtgraph/Qt.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/Qt.py b/pyqtgraph/Qt.py index ec5a79cc..cc8b3d0a 100644 --- a/pyqtgraph/Qt.py +++ b/pyqtgraph/Qt.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ This module exists to smooth out some of the differences between PySide and PyQt4: @@ -329,7 +330,7 @@ if m is not None and list(map(int, m.groups())) < versionReq: QAPP = None -def mkQApp(name="pyqtgraph", qt_args=[]): +def mkQApp(name="pyqtgraph", qt_args=None): """ Creates new QApplication or returns current instance if existing. @@ -342,5 +343,8 @@ def mkQApp(name="pyqtgraph", qt_args=[]): global QAPP QAPP = QtGui.QApplication.instance() if QAPP is None: - QAPP = QtGui.QApplication([name] + qt_args) + args = [name] + if qt_args is not None: + args.extend(qt_args) + QAPP = QtGui.QApplication(args) return QAPP