Skip to content

Commit

Permalink
fix issues with the class name
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Jun 25, 2024
1 parent 243fb52 commit 3163706
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/umlizer/class_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ def _get_entity_class_uml(klass: ClassDef) -> str:
class_name = klass.name

if base_classes:
class_name += f' ({base_classes})'
if len(base_classes) < 20: # noqa: PLR2004
class_name += f' ({base_classes})'
else:
class_name += ' (\\n' + base_classes.replace(', ', ',\\n ') + ')'

# Formatting fields and methods
fields_struct = klass.fields
Expand Down

0 comments on commit 3163706

Please sign in to comment.