src/eric7/DocumentationTools/APIGenerator.py

branch
eric7
changeset 10373
093dcebe5ecb
parent 10065
de4ae767b0e3
child 10423
299802979277
--- a/src/eric7/DocumentationTools/APIGenerator.py	Sun Dec 03 16:44:52 2023 +0100
+++ b/src/eric7/DocumentationTools/APIGenerator.py	Sun Dec 03 19:46:34 2023 +0100
@@ -53,7 +53,7 @@
         """
         bases = {}
         self.includePrivate = includePrivate
-        classNames = sorted(self.module.classes.keys())
+        classNames = sorted(self.module.classes)
         for className in classNames:
             if (
                 not self.__isPrivate(self.module.classes[className])
@@ -82,7 +82,7 @@
 
         moduleNameStr = "{0}".format(self.moduleName)
 
-        for globalName in sorted(self.module.globals.keys()):
+        for globalName in sorted(self.module.globals):
             if not self.__isPrivate(self.module.globals[globalName]):
                 if self.module.globals[globalName].isPublic():
                     iconId = Editor.AttributeID
@@ -98,7 +98,7 @@
         """
         Private method to generate the api section for classes.
         """
-        classNames = sorted(self.module.classes.keys())
+        classNames = sorted(self.module.classes)
         for className in classNames:
             if not self.__isPrivate(self.module.classes[className]):
                 self.__addClassVariablesAPI(className)
@@ -113,7 +113,7 @@
         from eric7.QScintilla.Editor import Editor
 
         _class = self.module.classes[className]
-        methods = sorted(_class.methods.keys())
+        methods = sorted(_class.methods)
         if "__init__" in methods:
             methods.remove("__init__")
             if _class.isPublic():
@@ -160,7 +160,7 @@
 
         _class = self.module.classes[className]
         classNameStr = "{0}{1}.".format(self.moduleName, className)
-        for variable in sorted(_class.globals.keys()):
+        for variable in sorted(_class.globals):
             if not self.__isPrivate(_class.globals[variable]):
                 if _class.globals[variable].isPublic():
                     iconId = Editor.AttributeID
@@ -176,7 +176,7 @@
         """
         from eric7.QScintilla.Editor import Editor
 
-        funcNames = sorted(self.module.functions.keys())
+        funcNames = sorted(self.module.functions)
         for funcName in funcNames:
             if not self.__isPrivate(self.module.functions[funcName]):
                 if self.module.functions[funcName].isPublic():

eric ide

mercurial