diff options
| author | Josh Ferrell <josh@vector35.com> | 2025-11-19 12:40:29 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2025-11-19 15:05:16 -0500 |
| commit | dae5a014ccbfe5a99379163b49e426eeb0b9e766 (patch) | |
| tree | 7e6d66c5dec8620f7299ed3e0e6c756875e871b1 /python/flowgraph.py | |
| parent | d4a7ed9b8fce07ce7206d4ab48b0b333ae69d47a (diff) | |
Improve python api type hints
Diffstat (limited to 'python/flowgraph.py')
| -rw-r--r-- | python/flowgraph.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/flowgraph.py b/python/flowgraph.py index 4cbb40d8..527ddd8b 100644 --- a/python/flowgraph.py +++ b/python/flowgraph.py @@ -21,7 +21,7 @@ import ctypes import threading import traceback -from typing import List, Optional, Tuple +from typing import List, Optional, Tuple, Union # Binary Ninja components import binaryninja @@ -41,7 +41,7 @@ from . import interaction class FlowGraphEdge: - def __init__(self, branch_type, source, target, points, back_edge, style): + def __init__(self, branch_type: Union[BranchType, int], source: 'FlowGraphNode', target: 'FlowGraphNode', points: List[Tuple[float, float]], back_edge: bool, style: 'EdgeStyle'): self.type = BranchType(branch_type) self.source = source self.target = target @@ -85,7 +85,7 @@ class EdgeStyle: class FlowGraphNode: - def __init__(self, graph=None, handle=None): + def __init__(self, graph: Optional['FlowGraph'] = None, handle=None): _handle = handle if _handle is None: if graph is None: @@ -343,7 +343,7 @@ class FlowGraphNode: class FlowGraphLayoutRequest: - def __init__(self, graph, callback=None): + def __init__(self, graph: 'FlowGraph', callback=None): self.on_complete = callback self._cb = ctypes.CFUNCTYPE(None, ctypes.c_void_p)(self._complete) self.handle = core.BNStartFlowGraphLayout(graph.handle, None, self._cb) |
