Skip to content

Commit 50c89b9

Browse files
committed
fix hold statements
1 parent d542d77 commit 50c89b9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/axiomatic/pic_helpers.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,10 @@ def print_statements(
328328
if (param_stmt.formalization is None or param_stmt.formalization.mapping is None) and only_formalized:
329329
continue
330330
val = param_stmt.validation or param_val
331-
holds_tag = "holds" if val.holds else "not-hold"
331+
if val.holds is not None:
332+
holds_tag = "holds" if val.holds else "not-hold"
333+
else:
334+
holds_tag = ''
332335
html_parts.append(f'<div class="block {holds_tag}">')
333336
html_parts.append(f"<h2>{param_stmt.type}</h2>")
334337
html_parts.append(f'<p><span class="label">Statement:</span> {param_stmt.text}</p>')
@@ -359,8 +362,11 @@ def print_statements(
359362
):
360363
if struct_stmt.formalization is None and only_formalized:
361364
continue
362-
363-
holds_tag = "holds" if struct_val.holds else "not-hold"
365+
366+
if val.holds is not None:
367+
holds_tag = "holds" if struct_val.holds else "not-hold"
368+
else:
369+
holds_tag = ''
364370
html_parts.append(f'<div class="block {holds_tag}">')
365371
html_parts.append(f"<h2>Type: {struct_stmt.type}</h2>")
366372
html_parts.append(f'<p><span class="label ">Statement:</span> {struct_stmt.text}</p>')

0 commit comments

Comments
 (0)