Skip to content

Commit

Permalink
change block instruction type to return iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDavid committed Apr 25, 2024
1 parent f59c24c commit a7a54a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bindings/python/quokka/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

if TYPE_CHECKING:
import pypcode
from quokka.instruction import Instruction
from typing import Iterator

logger: logging.Logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -187,9 +189,9 @@ def constants(self) -> List[int]:
return constants

@property
def instructions(self):
def instructions(self) -> Iterator[Instruction]:
"""Accessor of the block instructions"""
return self.values()
return iter(self.values())

def __repr__(self) -> str:
"""Block Representation"""
Expand Down

0 comments on commit a7a54a2

Please sign in to comment.