--- a/eric6/Graphics/UMLClassDiagramBuilder.py Tue May 04 19:30:25 2021 +0200 +++ b/eric6/Graphics/UMLClassDiagramBuilder.py Tue May 04 20:03:40 2021 +0200 @@ -25,12 +25,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 file file name of a python module 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 file file name of a python module 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("UMLClassDiagramBuilder") @@ -55,8 +59,10 @@ """ Private method to get the named shape. - @param name name of the shape (string) - @return shape (QGraphicsItem) + @param name name of the shape + @type str + @return shape + @rtype QGraphicsItem """ return self.allClasses.get(name) @@ -154,9 +160,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) @@ -227,11 +236,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 @@ -257,9 +271,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) @@ -275,6 +292,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: @@ -291,7 +309,8 @@ """ Public method to get a string for data to be persisted. - @return persisted data string (string) + @return persisted data string + @rtype str """ return "file={0}, no_attributes={1}".format(self.file, self.noAttrs) @@ -299,9 +318,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 (