Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 45b77ae

Browse files
committed
Use list instead of Iterable where appliable
1 parent f14b5b0 commit 45b77ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pyk/proof/implies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def __init__(self, proof: ImpliesProof, kcfg_explore: KCFGExplore):
414414
super().__init__(kcfg_explore)
415415
self.proof = proof
416416

417-
def step_proof(self, step: ImpliesProofStep) -> Iterable[ImpliesProofResult]:
417+
def step_proof(self, step: ImpliesProofStep) -> list[ImpliesProofResult]:
418418
proof_type = type(step.proof).__name__
419419
_LOGGER.info(f'Attempting {proof_type} {step.proof.id}')
420420

src/pyk/proof/reachability.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def __init__(
138138
assert type(subproof) is RefutationProof
139139
self.node_refutations[node_id] = subproof
140140

141-
def get_steps(self) -> Iterable[APRProofStep]:
141+
def get_steps(self) -> list[APRProofStep]:
142142
return [APRProofStep(self, node.id) for node in self.pending]
143143

144144
def commit(self, result: APRProofResult) -> None:
@@ -724,7 +724,7 @@ def _check_subsume(self, node: KCFG.Node) -> CSubst | None:
724724
_LOGGER.info(f'Subsumed into target node {self.proof.id}: {shorten_hashes((node.id, self.proof.target))}')
725725
return csubst
726726

727-
def step_proof(self, step: APRProofStep) -> Iterable[APRProofResult]:
727+
def step_proof(self, step: APRProofStep) -> list[APRProofResult]:
728728
curr_node = step.proof.kcfg.node(step.node_id)
729729

730730
if step.proof.bmc_depth is not None and curr_node.id not in self._checked_for_bounded:
@@ -754,7 +754,7 @@ def step_proof(self, step: APRProofStep) -> Iterable[APRProofResult]:
754754
is_terminal = self.kcfg_explore.kcfg_semantics.is_terminal(curr_node.cterm)
755755
target_is_terminal = step.proof.is_terminal(step.proof.target)
756756

757-
terminal_result = [APRProofTerminalResult(node_id=curr_node.id)] if is_terminal else []
757+
terminal_result: list[APRProofResult] = [APRProofTerminalResult(node_id=curr_node.id)] if is_terminal else []
758758

759759
# Subsumption should be checked if and only if the target node
760760
# and the current node are either both terminal or both not terminal

0 commit comments

Comments
 (0)