Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong type annotations for KCFG.NDBranch #4661

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pyk/src/pyk/kcfg/kcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def replace_target(self, node: KCFG.Node) -> KCFG.NDBranch:
_merged_edges: dict[int, MergedEdge]
_covers: dict[int, Cover]
_splits: dict[int, Split]
_ndbranches: dict[int, NDBranch]
_ndbranches: dict[int, KCFG.NDBranch]
_aliases: dict[str, int]
_lock: RLock

Expand Down Expand Up @@ -1063,7 +1063,9 @@ def create_split_by_nodes(self, source_id: NodeIdLike, target_ids: Iterable[Node
return None
return self.create_split(source.id, zip(target_ids, csubsts, strict=True))

def ndbranches(self, *, source_id: NodeIdLike | None = None, target_id: NodeIdLike | None = None) -> list[NDBranch]:
def ndbranches(
self, *, source_id: NodeIdLike | None = None, target_id: NodeIdLike | None = None
) -> list[KCFG.NDBranch]:
source_id = self._resolve(source_id) if source_id is not None else None
target_id = self._resolve(target_id) if target_id is not None else None
return [
Expand All @@ -1072,7 +1074,7 @@ def ndbranches(self, *, source_id: NodeIdLike | None = None, target_id: NodeIdLi
if (source_id is None or source_id == b.source.id) and (target_id is None or target_id in b.target_ids)
]

def contains_ndbranch(self, ndbranch: NDBranch) -> bool:
def contains_ndbranch(self, ndbranch: KCFG.NDBranch) -> bool:
return ndbranch in self._ndbranches

def create_ndbranch(
Expand Down