INNER CODE UNIT · Python
_list_contains
christopherkarani/Wax · Resources/hermes/wax-memory-plugin/cli.py:159
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]:
home = Path(hermes_home or os.environ.get("HERMES_HOME") or Path.home() / ".hermes")
path = home / "config.yaml"
if not path.is_file():
return []