From a7a54a2f2a12a0ecac2f3bcf64b26432f2215f45 Mon Sep 17 00:00:00 2001 From: Robin David Date: Thu, 25 Apr 2024 11:36:20 +0200 Subject: [PATCH] change block instruction type to return iterator --- bindings/python/quokka/block.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bindings/python/quokka/block.py b/bindings/python/quokka/block.py index fa48d3c..2c5fc8f 100644 --- a/bindings/python/quokka/block.py +++ b/bindings/python/quokka/block.py @@ -36,6 +36,8 @@ if TYPE_CHECKING: import pypcode + from quokka.instruction import Instruction + from typing import Iterator logger: logging.Logger = logging.getLogger(__name__) @@ -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"""