removed a default mutable argument pitfall (#809)

This commit is contained in:
Naelson Douglas C. Oliveira 2021-10-31 12:21:18 -03:00 committed by GitHub
parent 1ab8241d0e
commit e9dbbd80bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1600,11 +1600,13 @@ def read(filename, default=None):
return default return default
def get_main_app(argv=[]): def get_main_app(argv=None):
""" """
Standard boilerplate Qt application code. Standard boilerplate Qt application code.
Do everything but app.exec_() -- so that we can test the application in one thread Do everything but app.exec_() -- so that we can test the application in one thread
""" """
if not argv:
argv = []
app = QApplication(argv) app = QApplication(argv)
app.setApplicationName(__appname__) app.setApplicationName(__appname__)
app.setWindowIcon(new_icon("app")) app.setWindowIcon(new_icon("app"))