PluginApis.py

changeset 28
d772634a378a
parent 27
fb49ef163b34
child 30
30eb69e6049c
diff -r fb49ef163b34 -r d772634a378a PluginApis.py
--- a/PluginApis.py	Wed Jan 01 11:58:51 2020 +0100
+++ b/PluginApis.py	Wed Jun 24 18:48:08 2020 +0200
@@ -7,8 +7,6 @@
 Module implementing the APIs plugin.
 """
 
-from __future__ import unicode_literals
-
 import os
 import glob
 
@@ -19,16 +17,16 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "2.1.0"
+version = "3.0.0"
 className = "PluginApis"
 packageName = "APIs"
 shortDescription = "API files for auto-completion and call tips."
-longDescription = \
-    """This plug-in provides API files for auto-completion""" \
+longDescription = (
+    """This plug-in provides API files for auto-completion"""
     """ and call tips that are often missing from distribution packages."""
+)
 needsRestart = False
 pyqtApi = 2
-python2Compatible = True
 # End-of-Header
 
 error = ""
@@ -41,21 +39,15 @@
     @param language language to get APIs for (string)
     @return list of API filenames (list of string)
     """
-    if language in ["Python3", "Python2", "Python"]:
-        apisDir = \
-            os.path.join(os.path.dirname(__file__), "APIs", "Python")
+    if language in ["Python3", "Python"]:
+        apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python")
         apis = glob.glob(os.path.join(apisDir, '*.api'))
-        if language == "Python3":
-            apisDir = \
-                os.path.join(os.path.dirname(__file__), "APIs", "Python3")
-            apis.extend(glob.glob(os.path.join(apisDir, '*.api')))
-        else:
-            apisDir = \
-                os.path.join(os.path.dirname(__file__), "APIs", "Python2")
-            apis.extend(glob.glob(os.path.join(apisDir, '*.api')))
+        
+        apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python3")
+        apis.extend(glob.glob(os.path.join(apisDir, '*.api')))
+        return apis
     else:
-        apis = []
-    return apis
+        return []
 
 
 class PluginApis(QObject):

eric ide

mercurial