Fix problems with older versions of Python
This commit is contained in:
parent
7daee41907
commit
c248fc9090
2 changed files with 5 additions and 2 deletions
|
|
@ -28,7 +28,9 @@ def render_class_diagram(state, model, prefix_ids=""):
|
||||||
if lower_card == None and upper_card == None:
|
if lower_card == None and upper_card == None:
|
||||||
card_spec = ""
|
card_spec = ""
|
||||||
else:
|
else:
|
||||||
card_spec = f"{0 if lower_card == None else lower_card}..{"*" if upper_card == None else upper_card}"
|
low = "0" if lower_card == None else lower_card
|
||||||
|
upp = "*" if upper_card == None else upper_card
|
||||||
|
card_spec = f"{low}..{upp}"
|
||||||
|
|
||||||
if is_abstract:
|
if is_abstract:
|
||||||
output += f"\nabstract class \"{name} {card_spec}\" as {make_id(class_node)}"
|
output += f"\nabstract class \"{name} {card_spec}\" as {make_id(class_node)}"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ def render_conformance_check_result(error_list):
|
||||||
if len(error_list) == 0:
|
if len(error_list) == 0:
|
||||||
return "OK"
|
return "OK"
|
||||||
else:
|
else:
|
||||||
return f"There were {len(error_list)} errors: \n {'\n '.join(error_list)}"
|
joined = '\n '.join(error_list)
|
||||||
|
return f"There were {len(error_list)} errors: \n {joined}"
|
||||||
|
|
||||||
|
|
||||||
class Conformance:
|
class Conformance:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue