From bc5c0977dc5b4087e8f39cc67089bb5709aac04e Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Wed, 23 Jun 2021 20:20:50 -0400 Subject: 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 --- python/platform.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'python/platform.py') 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) -- cgit v1.3.1