diff options
| author | Josh Ferrell <josh@vector35.com> | 2022-12-22 14:54:19 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2022-12-22 15:20:27 -0500 |
| commit | b5124b220868851108193f44b9111d4039ff7b12 (patch) | |
| tree | f66774a0da998e09cefd4efb2fab2ae4089ff395 /python/platform.py | |
| parent | d0b71355485126d15389f9f2de201cc154e19c69 (diff) | |
Fix many incorrect type hints and type errors
Diffstat (limited to 'python/platform.py')
| -rw-r--r-- | python/platform.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/platform.py b/python/platform.py index 4351fe94..355f7c10 100644 --- a/python/platform.py +++ b/python/platform.py @@ -61,7 +61,7 @@ class Platform(metaclass=_PlatformMetaClass): type_file_path = None # path to platform types file type_include_dirs = [] # list of directories available to #include from type_file_path - def __init__(self, arch: 'architecture.Architecture' = None, handle=None): + def __init__(self, arch: Optional['architecture.Architecture'] = None, handle=None): if handle is None: if arch is None: raise ValueError("platform must have an associated architecture") @@ -84,7 +84,7 @@ class Platform(metaclass=_PlatformMetaClass): _arch = architecture.CoreArchitecture._from_cache(core.BNGetPlatformArchitecture(_handle)) assert _handle is not None assert _arch is not None - self.handle:ctypes.POINTER(BNPlatform) = _handle + self.handle: ctypes.POINTER(core.BNPlatform) = _handle self._arch = _arch self._name = None @@ -119,7 +119,7 @@ class Platform(metaclass=_PlatformMetaClass): @classmethod @property - def os_list(self) -> List[str]: + def os_list(cls) -> List[str]: binaryninja._init_plugins() count = ctypes.c_ulonglong() platforms = core.BNGetPlatformOSList(count) |
