bug fix: too many entries in available plugins list
... because a member variable was shadowed by a local variable
@@ -643,16 +643,15 @@ class QtPluginDialog(QDialog):
plugin_manager.discover() # since they might not be loaded yet
- already_installed = set()
+ self.already_installed = set()
def _add_to_installed(distname, enabled, npe_version=1):
-
if distname:
meta = standard_metadata(distname)
if len(meta) == 0:
# will not add builtins.
return
- already_installed.add(distname)
+ self.already_installed.add(distname)
else:
meta = {}
@@ -672,7 +671,7 @@ class QtPluginDialog(QDialog):
for manifest in _npe2.iter_manifests():
distname = normalized_name(manifest.name or '')
- if distname in already_installed or distname == 'napari':
+ if distname in self.already_installed or distname == 'napari':
continue
_add_to_installed(distname, True, npe_version=2)
@@ -680,7 +679,7 @@ class QtPluginDialog(QDialog):
# not showing these in the plugin dialog
if plugin_name in ('napari_plugin_engine',):
continue
- if distname in already_installed:
+ if distname in self.already_installed:
continue
_add_to_installed(
distname, not plugin_manager.is_blocked(plugin_name)
