Skip to content

Commit

Permalink
try fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Oct 16, 2024
1 parent 452a538 commit 7908294
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions napari_plugin_manager/qt_plugin_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,7 @@ def _setup_shortcuts(self):
self._quit_action.triggered.connect(self._quit)
self.addAction(self._quit_action)

self._close_shortcut = QShortcut(
QKeySequence('Ctrl+W'), self
)
self._close_shortcut = QShortcut(QKeySequence('Ctrl+W'), self)
self._close_shortcut.activated.connect(self.close)
get_settings().appearance.events.theme.connect(self._update_theme)

Expand Down Expand Up @@ -996,13 +994,17 @@ def _on_process_finished(self, process_finished_data: ProcessFinishedData):
for pkg_name in pkg_names:
self.installed_list.refreshItem(pkg_name)
elif action == InstallerActions.UPGRADE:
print('process_finished_data', process_finished_data)
pkg_info = [
(pkg.split('==')[0], pkg.split('==')[1])
for pkg in process_finished_data['pkgs']
]
for pkg_name, pkg_version in pkg_info:
self.installed_list.refreshItem(pkg_name, version=pkg_version)
for pkg in process_finished_data['pkgs']:
if '==' in pkg:
pkg_name, pkg_version = (
pkg.split('==')[0],
pkg.split('==')[1],
)
self.installed_list.refreshItem(
pkg_name, version=pkg_version
)
else:
self.installed_list.refreshItem(pkg)
self._tag_outdated_plugins()
elif action in [InstallerActions.CANCEL, InstallerActions.CANCEL_ALL]:
for pkg_name in pkg_names:
Expand Down Expand Up @@ -1468,6 +1470,7 @@ def _refresh_and_clear_cache(self):
# region - Qt overrides
# ------------------------------------------------------------------------
def closeEvent(self, event):
print('CLOSE EVENT CALLED')
if self._parent is not None:
plugin_dialog = getattr(self._parent, '_plugin_dialog', self)
if self != plugin_dialog:
Expand Down

0 comments on commit 7908294

Please sign in to comment.