MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / set

Method set

bleachbit/Options.py:452–462  ·  view source on GitHub ↗

Set a general option

(self, key, value, section='bleachbit')

Source from the content-addressed store, hash-verified

450 self.set("version", bleachbit.APP_VERSION)
451
452 def set(self, key, value, section='bleachbit'):
453 """Set a general option"""
454 assert isinstance(key, str), f"key must be a string: {key}"
455 assert isinstance(section, str), f"section must be a string: {section}"
456 override_key = (section, key)
457 if override_key not in self.overrides:
458 value = str(value)
459 if self.config.has_option(section, key) and self.config.get(section, key) == value:
460 return
461 self.config.set(section, key, value)
462 self.__schedule_flush()
463
464 def commit(self):
465 """Cancel times and write changes"""

Callers 15

test_purgeMethod · 0.95
test_error_disk_fullMethod · 0.95
test_error_permissionMethod · 0.95
restoreMethod · 0.95
set_hashpathMethod · 0.95
toggleMethod · 0.95
_on_abortMethod · 0.45
_on_delete_eventMethod · 0.45
toggledFunction · 0.45
__init__Method · 0.45

Calls 3

__schedule_flushMethod · 0.95
has_optionMethod · 0.45
getMethod · 0.45

Tested by 4

test_purgeMethod · 0.76
test_error_disk_fullMethod · 0.76
test_error_permissionMethod · 0.76