From ac418b75ea4c6af71a419f9e5b8a05dc36427542 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Thu, 30 Sep 2021 16:59:45 -0400 Subject: Fix type errors in Platform and prevent creation of Platform without name --- python/platform.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'python') diff --git a/python/platform.py b/python/platform.py index 610e800a..0d06e362 100644 --- a/python/platform.py +++ b/python/platform.py @@ -20,7 +20,7 @@ import os import ctypes -from typing import Mapping +from typing import Mapping, Optional, List # Binary Ninja components import binaryninja @@ -56,7 +56,7 @@ class Platform(metaclass=_PlatformMetaClass): ``class Platform`` contains all information related to the execution environment of the binary, mainly the calling conventions used. """ - name = None # type: ignore + name = None type_file_path = None # path to platform types file type_include_dirs = [] # list of directories available to #include from type_file_path @@ -81,10 +81,6 @@ class Platform(metaclass=_PlatformMetaClass): self.handle = _handle self._arch = _arch - @property - def name(self) -> str: - return core.BNGetPlatformName(self.handle) - def __del__(self): if core is not None: core.BNFreePlatform(self.handle) -- cgit v1.3.1