--- a/eric6/Graphics/ClassItem.py Mon May 03 19:42:27 2021 +0200 +++ b/eric6/Graphics/ClassItem.py Mon May 03 19:58:28 2021 +0200 @@ -229,7 +229,9 @@ height = self.header.boundingRect().height() if self.classAttributes: width = max(width, self.classAttributes.boundingRect().width()) - height += self.classAttributes.boundingRect().height() + self.margin + height += ( + self.classAttributes.boundingRect().height() + self.margin + ) if self.attrs: width = max(width, self.attrs.boundingRect().width()) height = height + self.attrs.boundingRect().height() + self.margin @@ -243,7 +245,8 @@ """ Public method to set the class model. - @param model class model containing the class data (ClassModel) + @param model class model containing the class data + @type ClassModel """ self.scene().removeItem(self.header) self.header = None @@ -264,9 +267,12 @@ """ Public method to paint the item in local coordinates. - @param painter reference to the painter object (QPainter) - @param option style options (QStyleOptionGraphicsItem) - @param widget optional reference to the widget painted on (QWidget) + @param painter reference to the painter object + @type QPainter + @param option style options + @type QStyleOptionGraphicsItem + @param widget optional reference to the widget painted on + @type QWidget """ pen = self.pen() if ( @@ -304,7 +310,8 @@ """ Public method returning the external state. - @return external state (boolean) + @return external state + @rtype bool """ return self.external @@ -316,7 +323,8 @@ "attribute=value" with pairs separated by ", ". value must not contain ", " or newlines. - @return persistence data (string) + @return persistence data + @rtype str """ entries = [ "is_external={0}".format(self.external), @@ -342,9 +350,12 @@ """ Public method to parse the given persistence 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 len(parts) < 3: