diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-08-27 13:18:01 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-06 11:46:43 -0400 |
| commit | 63b3a0838334e6eb728d0e3c8250265e58c4cf4c (patch) | |
| tree | 7c1ef1850391906c96674b83a708448c5d4cee3b /python/architecture.py | |
| parent | bff5a6e38c945833ddb22c379d57f556244a2e25 (diff) | |
Add some additional typehints to architecture.py, function.py and metadata.py, callingconvention.py, binaryview.py, highlevelil.py, scriptingprovider.py, types.py
Fix typehint for Union[QualifiedName, str]
Diffstat (limited to 'python/architecture.py')
| -rw-r--r-- | python/architecture.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/architecture.py b/python/architecture.py index 0b46c8ff..bbed133a 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -116,7 +116,7 @@ class IntrinsicInfo: class InstructionBranch: type:BranchType target:int - arch:'Architecture' + arch:Optional['Architecture'] def __repr__(self): if self.arch is not None: @@ -131,7 +131,7 @@ class InstructionInfo: branch_delay:bool = False branches:List[InstructionBranch] = field(default_factory=list) - def add_branch(self, branch_type, target = 0, arch = None): + def add_branch(self, branch_type:BranchType, target:int = 0, arch:Optional['Architecture'] = None) -> None: self.branches.append(InstructionBranch(branch_type, target, arch)) def __len__(self): @@ -2663,7 +2663,7 @@ class ArchitectureHook(CoreArchitecture): self._cb.getIntrinsicOutputs = self._cb.getIntrinsicOutputs.__class__() self._cb.freeTypeList = self._cb.freeTypeList.__class__() - def register(self): + def register(self) -> None: self.__class__._registered_cb = self._cb self.handle = core.BNRegisterArchitectureHook(self._base_arch.handle, self._cb) core.BNFinalizeArchitectureHook(self._base_arch.handle) |
