From 31637069a6cf27e923f38bc958ee8d32797bea07 Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Tue, 25 Jun 2024 12:13:35 -0400 Subject: [PATCH] fix issues with the class name --- src/umlizer/class_graph.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/umlizer/class_graph.py b/src/umlizer/class_graph.py index 238e055..f01c0e1 100644 --- a/src/umlizer/class_graph.py +++ b/src/umlizer/class_graph.py @@ -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