eric6/Graphics/PackageDiagramBuilder.py

changeset 8289
871b40c5a77a
parent 8286
62ae22eae123
child 8291
3d79b1e5bf3c
--- a/eric6/Graphics/PackageDiagramBuilder.py	Tue May 04 19:30:25 2021 +0200
+++ b/eric6/Graphics/PackageDiagramBuilder.py	Tue May 04 20:03:40 2021 +0200
@@ -4,7 +4,7 @@
 #
 
 """
-Module implementing a dialog showing a UML like class diagram of a package.
+Module implementing a dialog showing an UML like class diagram of a package.
 """
 
 import glob
@@ -29,12 +29,16 @@
         """
         Constructor
         
-        @param dialog reference to the UML dialog (UMLDialog)
-        @param view reference to the view object (UMLGraphicsView)
-        @param project reference to the project object (Project)
-        @param package name of a python package to be shown (string)
+        @param dialog reference to the UML dialog
+        @type UMLDialog
+        @param view reference to the view object
+        @type UMLGraphicsView
+        @param project reference to the project object
+        @type Project
+        @param package name of a python package to be shown
+        @type str
         @param noAttrs flag indicating, that no attributes should be shown
-            (boolean)
+        @type bool
         """
         super().__init__(dialog, view, project)
         self.setObjectName("PackageDiagram")
@@ -59,8 +63,10 @@
         """
         Private method to get the named shape.
         
-        @param name name of the shape (string)
-        @return shape (QCanvasItem)
+        @param name name of the shape
+        @type str
+        @return shape
+        @rtype QCanvasItem
         """
         return self.allClasses.get(name)
     
@@ -69,7 +75,8 @@
         Private method to build a dictionary of modules contained in the
         package.
         
-        @return dictionary of modules contained in the package.
+        @return dictionary of modules contained in the package
+        @rtype dict
         """
         import Utilities.ModuleParser
         
@@ -121,6 +128,7 @@
         package.
         
         @return dictionary of sub-packages contained in this package
+        @rtype dict
         """
         import Utilities.ModuleParser
         
@@ -298,9 +306,12 @@
         The algorithm is borrowed from Boa Constructor.
         
         @param nodes list of nodes to arrange
+        @type list of str
         @param routes list of routes
+        @type list of tuple of (str, str)
         @param whiteSpaceFactor factor to increase whitespace between
-            items (float)
+            items
+        @type float
         """
         from . import GraphicsUtilities
         generations = GraphicsUtilities.sort(nodes, routes)
@@ -371,11 +382,16 @@
         """
         Private method to add a class defined in the module.
         
-        @param className name of the class to be as a dictionary key (string)
-        @param _class class to be shown (ModuleParser.Class)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
-        @param isRbModule flag indicating a Ruby module (boolean)
+        @param className name of the class to be as a dictionary key
+        @type str
+        @param _class class to be shown
+        @type ModuleParser.Class
+        @param x x-coordinate
+        @type float
+        @param y y-coordinate
+        @type float
+        @param isRbModule flag indicating a Ruby module
+        @type bool
         """
         from .ClassItem import ClassItem, ClassModel
         name = _class.name
@@ -399,9 +415,12 @@
         If the canvas is too small to take the shape, it
         is enlarged.
         
-        @param _class class to be shown (string)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
+        @param _class class to be shown
+        @type ModuleParser.Class
+        @param x x-coordinate
+        @type float
+        @param y y-coordinate
+        @type float
         """
         from .ClassItem import ClassItem, ClassModel
         cl = ClassModel(_class)
@@ -414,11 +433,14 @@
         """
         Private method to add a package to the diagram.
         
-        @param name package name to be shown (string)
+        @param name package name to be shown
+        @type str
         @param modules list of module names contained in the package
-            (list of strings)
-        @param x x-coordinate (float)
-        @param y y-coordinate (float)
+        @type list of str
+        @param x x-coordinate
+        @type float
+        @param y y-coordinate
+        @type float
         """
         from .PackageItem import PackageItem, PackageModel
         pm = PackageModel(name, modules)
@@ -432,6 +454,7 @@
         Private method to generate the associations between the class shapes.
         
         @param routes list of relationsships
+        @type list of tuple of (str, str)
         """
         from .AssociationItem import AssociationItem, AssociationType
         for route in routes:
@@ -448,7 +471,8 @@
         """
         Public method to get a string for data to be persisted.
         
-        @return persisted data string (string)
+        @return persisted data string
+        @rtype str
         """
         return "package={0}, no_attributes={1}".format(
             self.package, self.noAttrs)
@@ -457,9 +481,12 @@
         """
         Public method to parse persisted data.
         
-        @param version version of the data (string)
-        @param data persisted data to be parsed (string)
-        @return flag indicating success (boolean)
+        @param version version of the data
+        @type str
+        @param data persisted data to be parsed
+        @type str
+        @return flag indicating success
+        @rtype bool
         """
         parts = data.split(", ")
         if (

eric ide

mercurial