summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2025-10-15 13:15:42 -0400
committerJosh Ferrell <josh@vector35.com>2025-10-15 13:16:01 -0400
commit25212cfd39f6dc45ce9030c194b6131645b76ba3 (patch)
tree3d17e7456a8812887dc488371a7f48e0fb0a4946 /python/basicblock.py
parent501af661e5805cb0139ac7fca29b6a5dbd3beefd (diff)
Fix some python type hints
Diffstat (limited to 'python/basicblock.py')
-rw-r--r--python/basicblock.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index 9f02f2a9..4f279432 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -20,7 +20,7 @@
import ctypes
from dataclasses import dataclass
-from typing import Generator, Optional, List, Tuple
+from typing import Generator, Optional, List, Tuple, Union
# Binary Ninja components
import binaryninja
@@ -106,7 +106,7 @@ class BasicBlock:
core.BNFreeBasicBlock(self.handle)
@classmethod
- def _from_core_block(cls, block: core.BNBasicBlockHandle) -> Optional['BasicBlock']:
+ def _from_core_block(cls, block: core.BNBasicBlockHandle) -> Optional[Union['BasicBlock', 'binaryninja.lowlevelil.LowLevelILBasicBlock', 'binaryninja.mediumlevelil.MediumLevelILBasicBlock', 'binaryninja.highlevelil.HighLevelILBasicBlock']]:
"""From a BNBasicBlockHandle, get a BasicBlock or one of the IL subclasses (takes ref)"""
func_handle = core.BNGetBasicBlockFunction(block)
if not func_handle:
@@ -674,8 +674,8 @@ class BasicBlock:
Dominance frontier for this basic block (read-only)
The dominance frontier of a basic block B is the set of blocks that are not strictly dominated by B,
- but are immediately control-dependent on B. In other words, it contains the blocks where B's dominance
- "stops" - the blocks that have at least one predecessor not dominated by B, while having another
+ but are immediately control-dependent on B. In other words, it contains the blocks where B's dominance
+ "stops" - the blocks that have at least one predecessor not dominated by B, while having another
predecessor that is dominated by B.
"""
count = ctypes.c_ulonglong()