diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-10-28 12:21:13 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-10-29 16:38:02 -0400 |
| commit | 18ee363d8b11b0e09babf69193de19007b3be957 (patch) | |
| tree | bd23649aec21f6fc46fd5b96b783b793ad37b732 /python | |
| parent | 36982c4208d8aaa369211ec2d5f3aad3b2f57ee7 (diff) | |
Small type hint fixes
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 2 | ||||
| -rw-r--r-- | python/settings.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index d24d5412..e213c456 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -9434,7 +9434,7 @@ to a the type "tagRECT" found in the typelibrary "winX64common" return None return settings.Settings(handle=settings_handle) - def set_load_settings(self, type_name: str, settings: settings.Settings) -> None: + def set_load_settings(self, type_name: str, settings: Optional[settings.Settings]) -> None: """ ``set_load_settings`` set a :py:class:`~binaryninja.settings.Settings` object which defines the load settings for the given :py:class:`BinaryViewType` ``type_name`` diff --git a/python/settings.py b/python/settings.py index afa9983a..3a0c8e70 100644 --- a/python/settings.py +++ b/python/settings.py @@ -126,7 +126,7 @@ class Settings: """ default_handle = core.BNCreateSettings("default") - def __init__(self, instance_id: str = "default", handle=None): + def __init__(self, instance_id: Optional[str] = None, handle=None): if handle is None: if instance_id is None or instance_id == "": instance_id = "default" @@ -176,14 +176,14 @@ class Settings: :param BinaryView view: a BinaryView object :rtype: bool """ - def load_settings_file(self, filename: str=None, scope: 'SettingsScope' = SettingsScope.SettingsAutoScope, view: Optional['binaryview.BinaryView'] = None) -> bool: + def load_settings_file(self, filename: str = '', scope: 'SettingsScope' = SettingsScope.SettingsAutoScope, view: Optional['binaryview.BinaryView'] = None) -> bool: if filename is None: filename = "" if view is not None: view = view.handle return core.BNLoadSettingsFile(self.handle, filename, scope, view) - def set_resource_id(self, resource_id: str = None): + def set_resource_id(self, resource_id: str = ''): """ ``set_resource_id`` Sets the resource identifier for this class:`Settings` instance. When accessing setting values at the \ ``SettingsResourceScope`` level, the resource identifier is passed along through the backing store interface. |
