PluginApis.py

branch
eric7
changeset 53
f69d7f9ab8e4
parent 52
c8ea815f673d
child 55
2fde8fbab230
equal deleted inserted replaced
52:c8ea815f673d 53:f69d7f9ab8e4
15 # Start-of-Header 15 # Start-of-Header
16 name = "APIs Plugin" 16 name = "APIs Plugin"
17 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 17 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
18 autoactivate = True 18 autoactivate = True
19 deactivateable = True 19 deactivateable = True
20 version = "10.2.0" 20 version = "10.3.0"
21 className = "PluginApis" 21 className = "PluginApis"
22 packageName = "APIs" 22 packageName = "APIs"
23 shortDescription = "API files for auto-completion and call tips." 23 shortDescription = "API files for auto-completion and call tips."
24 longDescription = ( 24 longDescription = (
25 """This plug-in provides API files for auto-completion""" 25 """This plug-in provides API files for auto-completion"""
37 Module function to return the API files made available by this plugin. 37 Module function to return the API files made available by this plugin.
38 38
39 @param language language to get APIs for (string) 39 @param language language to get APIs for (string)
40 @return list of API filenames (list of string) 40 @return list of API filenames (list of string)
41 """ 41 """
42 if language in ["Python3", "Python"]: 42 if language:
43 apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python") 43 apisDir = os.path.join(os.path.dirname(__file__), "APIs", language)
44 apis = glob.glob(os.path.join(apisDir, "*.api")) 44 return glob.glob(os.path.join(apisDir, "*.api"))
45
46 apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python3")
47 apis.extend(glob.glob(os.path.join(apisDir, "*.api")))
48 return apis
49 else: 45 else:
50 return [] 46 return []
51 47
52 48
53 class PluginApis(QObject): 49 class PluginApis(QObject):

eric ide

mercurial