Spaces:
Running
Running
Update class_diagram_generator.py
Browse files
class_diagram_generator.py
CHANGED
|
@@ -243,7 +243,7 @@ def generate_class_diagram(json_input: str, output_format: str) -> str:
|
|
| 243 |
elif class_type == 'enum':
|
| 244 |
class_label += "<<enumeration>>\\n"
|
| 245 |
|
| 246 |
-
class_label += f"
|
| 247 |
|
| 248 |
if attributes:
|
| 249 |
class_label += "|"
|
|
@@ -257,7 +257,7 @@ def generate_class_diagram(json_input: str, output_format: str) -> str:
|
|
| 257 |
if attr_type:
|
| 258 |
attr_line += f" : {attr_type}"
|
| 259 |
if is_static:
|
| 260 |
-
attr_line = f"
|
| 261 |
class_label += f"{attr_line}\\l"
|
| 262 |
|
| 263 |
if methods:
|
|
@@ -284,9 +284,9 @@ def generate_class_diagram(json_input: str, output_format: str) -> str:
|
|
| 284 |
method_line += f") : {return_type}"
|
| 285 |
|
| 286 |
if is_static:
|
| 287 |
-
method_line = f"
|
| 288 |
if is_abstract:
|
| 289 |
-
method_line = f"
|
| 290 |
|
| 291 |
class_label += f"{method_line}\\l"
|
| 292 |
|
|
@@ -302,7 +302,7 @@ def generate_class_diagram(json_input: str, output_format: str) -> str:
|
|
| 302 |
|
| 303 |
dot.node(
|
| 304 |
class_name,
|
| 305 |
-
|
| 306 |
shape='record',
|
| 307 |
style=style,
|
| 308 |
fillcolor=fillcolor,
|
|
|
|
| 243 |
elif class_type == 'enum':
|
| 244 |
class_label += "<<enumeration>>\\n"
|
| 245 |
|
| 246 |
+
class_label += f"{class_name}"
|
| 247 |
|
| 248 |
if attributes:
|
| 249 |
class_label += "|"
|
|
|
|
| 257 |
if attr_type:
|
| 258 |
attr_line += f" : {attr_type}"
|
| 259 |
if is_static:
|
| 260 |
+
attr_line = f"{attr_line} (static)"
|
| 261 |
class_label += f"{attr_line}\\l"
|
| 262 |
|
| 263 |
if methods:
|
|
|
|
| 284 |
method_line += f") : {return_type}"
|
| 285 |
|
| 286 |
if is_static:
|
| 287 |
+
method_line = f"{method_line} (static)"
|
| 288 |
if is_abstract:
|
| 289 |
+
method_line = f"{method_line} (abstract)"
|
| 290 |
|
| 291 |
class_label += f"{method_line}\\l"
|
| 292 |
|
|
|
|
| 302 |
|
| 303 |
dot.node(
|
| 304 |
class_name,
|
| 305 |
+
class_label,
|
| 306 |
shape='record',
|
| 307 |
style=style,
|
| 308 |
fillcolor=fillcolor,
|