Skip to content

Commit 2b754c6

Browse files
committed
mypy
1 parent 9a6e415 commit 2b754c6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/axiomatic/pic_helpers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def print_statements(
333333
html_parts.append(f"<code>{code}</code>")
334334
html_parts.append("</p>")
335335
val = cost_val or cost_stmt.validation
336-
if val.satisfiable is not None and val.message is not None:
336+
if val and val.satisfiable is not None and val.message is not None:
337337
html_parts.append(f'<p><span class="label">Satisfiable:</span> {val.satisfiable}</p>')
338338
html_parts.append(f'<p><span class="label">Reason:</span> {val.message}</p>')
339339
html_parts.append("</div>")
@@ -345,7 +345,7 @@ def print_statements(
345345
if (param_stmt.formalization is None or param_stmt.formalization.mapping is None) and only_formalized:
346346
continue
347347
val = param_val or param_stmt.validation
348-
if val.holds is not None:
348+
if val and val.holds is not None:
349349
holds_tag = "holds" if val.holds else "not-hold"
350350
else:
351351
holds_tag = ''
@@ -367,7 +367,7 @@ def print_statements(
367367
code = code.replace(var_name, f"{computation.name}({args_str})")
368368
html_parts.append(f"<code>{code}</code>")
369369
html_parts.append("</p>")
370-
if val.satisfiable is not None and val.message is not None and val.holds is not None:
370+
if val and val.satisfiable is not None and val.message is not None and val.holds is not None:
371371
html_parts.append(f'<p><span class="label">Satisfiable:</span> {val.satisfiable}</p>')
372372
html_parts.append(f'<p><span class="label">Holds:</span> {val.holds}</p>')
373373
html_parts.append(f'<p><span class="label">Reason:</span> {val.message}</p>')
@@ -416,7 +416,7 @@ def print_statements(
416416
code = code.replace(var_name, f"{computation.name}({args_str})")
417417
print(code)
418418
val = cost_val or cost_stmt.validation
419-
if val.satisfiable is not None and val.message is not None:
419+
if val and val.satisfiable is not None and val.message is not None:
420420
print(f"Satisfiable: {val.satisfiable}")
421421
print(val.message)
422422
print("\n-----------------------------------\n")
@@ -444,7 +444,7 @@ def print_statements(
444444
code = code.replace(var_name, f"{computation.name}({args_str})")
445445
print(code)
446446
val = param_val or param_stmt.validation
447-
if val.satisfiable is not None and val.message is not None and val.holds is not None:
447+
if val and val.satisfiable is not None and val.message is not None and val.holds is not None:
448448
print(f"Satisfiable: {val.satisfiable}")
449449
print(f"Holds: {val.holds} ({val.message})")
450450
print("\n-----------------------------------\n")

0 commit comments

Comments
 (0)