File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,11 +159,10 @@ def run(manager: Manager, testing: bool = False) -> Any:
159159
160160 app = QApplication (sys .argv )
161161
162- # FIXME: remove ignores after https://github.com/python/mypy/issues/2955 has been fixed
163- # Without this, Ctrl+C will have no effect
164- signal .signal (signal .SIGINT , lambda : exit (manager )) #type: ignore
165- # Ensure cleanup happens on SIGTERM
166- signal .signal (signal .SIGTERM , lambda : exit (manager )) #type: ignore
162+ # Ensure cleanup happens on SIGTERM and SIGINT (kill and ctrl+c etc)
163+ # The 2 un-used variables are necessary
164+ signal .signal (signal .SIGINT , lambda _ , __ : exit (manager ))
165+ signal .signal (signal .SIGTERM , lambda _ , __ : exit (manager ))
167166
168167 timer = QtCore .QTimer ()
169168 timer .start (100 ) # You may change this if you wish.
You can’t perform that action at this time.
0 commit comments