| 508 | return (result, SettingsScope(c_scope.value)) |
| 509 | |
| 510 | def set_bool(self, key: str, value: bool, resource: Optional[Union['binaryview.BinaryView', 'function.Function']] = None, scope: 'SettingsScope' = SettingsScope.SettingsAutoScope) -> bool: |
| 511 | view_handle = None |
| 512 | func_handle = None |
| 513 | if resource is not None: |
| 514 | if isinstance(resource, binaryview.BinaryView): |
| 515 | view_handle = resource.handle |
| 516 | elif isinstance(resource, function.Function): |
| 517 | func_handle = resource.handle |
| 518 | else: |
| 519 | raise TypeError("Expected resource to be either a BinaryView or a Function.") |
| 520 | return core.BNSettingsSetBool(self.handle, view_handle, func_handle, scope, key, value) |
| 521 | |
| 522 | def set_double(self, key: str, value: float, resource: Optional[Union['binaryview.BinaryView', 'function.Function']] = None, scope: 'SettingsScope' = SettingsScope.SettingsAutoScope) -> bool: |
| 523 | view_handle = None |