File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 33from inspect import isabstract
44from re import compile as re_compile
55from typing import Dict , List , Type
6+ from warnings import warn
67
78from py2puml .domain .umlclass import UmlAttribute , UmlClass
89from py2puml .domain .umlitem import UmlItem
@@ -68,9 +69,13 @@ def inspect_static_attributes(
6869 attr_type = concrete_type
6970 # compound type (tuples, lists, dictionaries, etc.)
7071 else :
71- attr_type , full_namespaced_definitions = shorten_compound_type_annotation (
72- attr_raw_type , module_resolver
73- )
72+ try :
73+ attr_type , full_namespaced_definitions = shorten_compound_type_annotation (
74+ attr_raw_type , module_resolver
75+ )
76+ except ValueError :
77+ warn (f'Failed to shorten compound type annotation "{ attr_raw_type } " for attribute "{ attr_name } ". Skipping.' )
78+ continue
7479 relations_by_target_fqdn .update (
7580 {
7681 attr_fqn : UmlRelation (uml_class .fqn , attr_fqn , RelType .COMPOSITION )
You can’t perform that action at this time.
0 commit comments