ZahirJS commited on
Commit
5eae216
·
verified ·
1 Parent(s): 0e101d5

Update class_diagram_generator.py

Browse files
Files changed (1) hide show
  1. class_diagram_generator.py +5 -5
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"<B>{class_name}</B>"
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"<U>{attr_line}</U>"
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"<U>{method_line}</U>"
288
  if is_abstract:
289
- method_line = f"<I>{method_line}</I>"
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
- f"<{class_label}>",
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,