Skip to content

Commit bfd53a0

Browse files
committed
fix: daedalus script symbols as generator
1 parent 6cf104c commit bfd53a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/zenkit/daedalus_script.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
]
88

99
from abc import abstractmethod
10+
from collections.abc import Generator
1011
from ctypes import Structure
1112
from ctypes import c_float
1213
from ctypes import c_int
@@ -293,9 +294,9 @@ def load(path_or_file_like: PathOrFileLike) -> "DaedalusScript":
293294
return DaedalusScript(_handle=handle, _delete=True)
294295

295296
@property
296-
def symbols(self) -> list[DaedalusSymbol]:
297+
def symbols(self) -> Generator[DaedalusSymbol]:
297298
count = DLL.ZkDaedalusScript_getSymbolCount(self._handle)
298-
return [self.get_symbol_by_index(i) for i in range(count)]
299+
return (self.get_symbol_by_index(i) for i in range(count))
299300

300301
def get_instruction(self, address: int) -> DaedalusInstruction:
301302
return DLL.ZkDaedalusScript_getInstruction(self._handle, c_size_t(address))

0 commit comments

Comments
 (0)