INNER CODE UNIT · Python
_scalar
christopherkarani/Wax · Resources/hermes/wax-memory-plugin/cli.py:155
def _scalar(value: Optional[str]) -> str:
return _yaml_key((value or "").strip())
def _list_contains(value: Optional[str], expected: str) -> bool:
if value is None:
return False
stripped = value.strip()
if stripped.startswith("["):
return any(_scalar(item) == expected for item in _split_flow(stripped))
return any(
_scalar(line.strip()[1:].strip()) == expected
for line in stripped.splitlines()
if line.strip().startswith("-")
)
def _hermes_config_conflicts(hermes_home: str | None) -> list[str]: