summaryrefslogtreecommitdiff
path: root/python/platform.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-06-23 20:20:50 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-05 10:09:09 -0400
commitbc5c0977dc5b4087e8f39cc67089bb5709aac04e (patch)
tree2e955215d9a9000a84412f814d011248f6bdbe5d /python/platform.py
parent421b398453d09e06e7b202229e34b66414683a45 (diff)
type hints for highlevelil.py, mediumlevelil.py and lowlevelil.py, workflow.py
Fix linter error in scriptingprovider.py Update workflow.py using updated paradigms and type hints
Diffstat (limited to 'python/platform.py')
-rw-r--r--python/platform.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/platform.py b/python/platform.py
index 882b4acb..2dacf7a6 100644
--- a/python/platform.py
+++ b/python/platform.py
@@ -20,6 +20,7 @@
import os
import ctypes
+from typing import Mapping
# Binary Ninja components
import binaryninja
@@ -425,9 +426,9 @@ class Platform(metaclass=_PlatformMetaClass):
core.free_string(errors)
if not result:
raise SyntaxError(error_str)
- type_dict = {}
- variables = {}
- functions = {}
+ type_dict:Mapping[types.QualifiedName, types.Type] = {}
+ variables:Mapping[types.QualifiedName, types.Type] = {}
+ functions:Mapping[types.QualifiedName, types.Type] = {}
for i in range(0, parse.typeCount):
name = types.QualifiedName._from_core_struct(parse.types[i].name)
type_dict[name] = types.Type(core.BNNewTypeReference(parse.types[i].type), platform = self)