MCPcopy Create free account
hub / github.com/OpenCCU/OpenCCU / config_string

Method config_string

buildroot-external/scripts/kconfiglib.py:4566–4589  ·  view source on GitHub ↗

See the class documentation.

(self)

Source from the content-addressed store, hash-verified

4564
4565 @property
4566 def config_string(self):
4567 """
4568 See the class documentation.
4569 """
4570 # _write_to_conf is determined when the value is calculated. This is a
4571 # hidden function call due to property magic.
4572 val = self.str_value
4573 if not self._write_to_conf or self.is_transitional: # Omit transitional symbols
4574 return ""
4575
4576 if self.orig_type in _BOOL_TRISTATE:
4577 return "{}{}={}\n" \
4578 .format(self.kconfig.config_prefix, self.name, val) \
4579 if val != "n" else \
4580 "# {}{} is not set\n" \
4581 .format(self.kconfig.config_prefix, self.name)
4582
4583 if self.orig_type in _INT_HEX:
4584 return "{}{}={}\n" \
4585 .format(self.kconfig.config_prefix, self.name, val)
4586
4587 # sym.orig_type is STRING
4588 return '{}{}="{}"\n' \
4589 .format(self.kconfig.config_prefix, self.name, escape(val))
4590
4591 @property
4592 def name_and_loc(self):

Callers

nothing calls this directly

Calls 1

escapeFunction · 0.85

Tested by

no test coverage detected