MCPcopy Create free account
hub / github.com/HexHive/NASS / print_setting

Method print_setting

tools/gef.py:9629–9649  ·  view source on GitHub ↗
(self, plugin_name: str, verbose: bool = False)

Source from the content-addressed store, hash-verified

9627 return
9628
9629 def print_setting(self, plugin_name: str, verbose: bool = False) -> None:
9630 res = gef.config.raw_entry(plugin_name)
9631 string_color = gef.config["theme.dereference_string"]
9632 misc_color = gef.config["theme.dereference_base_address"]
9633
9634 if not res:
9635 return
9636
9637 _setting = Color.colorify(plugin_name, "green")
9638 _type = res.type.__name__
9639 if _type == "str":
9640 _value = f'"{Color.colorify(res.value, string_color)}"'
9641 else:
9642 _value = Color.colorify(res.value, misc_color)
9643
9644 gef_print(f"{_setting} ({_type}) = {_value}")
9645
9646 if verbose:
9647 gef_print(Color.colorify("\nDescription:", "bold underline"))
9648 gef_print(f"\t{res.description}")
9649 return
9650
9651 def print_settings(self) -> None:
9652 for x in sorted(gef.config):

Callers 2

invokeMethod · 0.95
print_settingsMethod · 0.95

Calls 3

gef_printFunction · 0.85
raw_entryMethod · 0.80
colorifyMethod · 0.80

Tested by

no test coverage detected