eric6/PluginManager/PluginRepositoryDialog.py

changeset 8259
2bbec88047dd
parent 8234
fcb6b4b96274
child 8268
6b8128e0c9d1
--- a/eric6/PluginManager/PluginRepositoryDialog.py	Wed Apr 21 17:56:12 2021 +0200
+++ b/eric6/PluginManager/PluginRepositoryDialog.py	Wed Apr 21 19:40:50 2021 +0200
@@ -935,14 +935,13 @@
     for pluginName in downloads:
         downloads[pluginName].sort(key=lambda x: x[1])
     
-        if (
-            pluginName in hiddenPlugins and
-            not Preferences.getPluginManager("KeepHidden")
-        ):
-            removeFiles = [f[0] for f in downloads[pluginName]]
-        else:
-            removeFiles = [f[0] for f in downloads[pluginName][
+        removeFiles = (
+            [f[0] for f in downloads[pluginName]]
+            if (pluginName in hiddenPlugins and
+                not Preferences.getPluginManager("KeepHidden")) else
+            [f[0] for f in downloads[pluginName][
                 :-Preferences.getPluginManager("KeepGenerations")]]
+        )
         for removeFile in removeFiles:
             try:
                 os.remove(os.path.join(downloadPath, removeFile))

eric ide

mercurial