MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _get_setting_value_str

Method _get_setting_value_str

pager/pager_display.py:927–938  ·  view source on GitHub ↗

Return a display string for the current value of a setting.

(self, setting)

Source from the content-addressed store, hash-verified

925 self.dialog_showing = False
926
927 def _get_setting_value_str(self, setting):
928 """Return a display string for the current value of a setting."""
929 key = setting['key']
930 stype = setting['type']
931 raw = self.shared_data.config.get(key)
932 if raw is None:
933 raw = getattr(self.shared_data, key, None)
934 if raw is None:
935 return '?'
936 if stype == 'bool':
937 return 'ON' if bool(raw) else 'OFF'
938 return str(raw)
939
940 def _get_setting_value_color(self, setting):
941 """Return a color for the current value display."""

Callers 1

_draw_settings_screenMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected