From 8d2420becf3f4e787f6809aa9c6609fe7bc3c08b Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Tue, 23 Nov 2021 09:01:36 -0500 Subject: Minor type hint improvements to lowlevelil.py --- python/lowlevelil.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 6130baa3..e131f187 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -72,6 +72,7 @@ LowLevelILOperandType = Union[ List['SSARegisterStack'], List['SSAFlag'], List['SSARegisterOrFlag'], + None ] class LowLevelILLabel: @@ -2875,8 +2876,8 @@ class LowLevelILFunction: self._source_function = value @property - def view(self) -> 'binaryview.BinaryView': - return self.source_function.view + def view(self) -> Optional['binaryview.BinaryView']: + return self.source_function.view if self.source_function else None @property def il_form(self) -> FunctionGraphType: -- cgit v1.3.1