MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _extract_case_pattern

Function _extract_case_pattern

tests/test_hooks.py:1011–1018  ·  view source on GitHub ↗

Pull the `*[!...]*` glob portion of a real case arm out of _PYTHON_DETECT by a unique anchor, so tests run against the emitted text, not a copy.

(marker: str)

Source from the content-addressed store, hash-verified

1009
1010
1011def _extract_case_pattern(marker: str) -> str:
1012 """Pull the `*[!...]*` glob portion of a real case arm out of _PYTHON_DETECT
1013 by a unique anchor, so tests run against the emitted text, not a copy."""
1014 from graphify.hooks import _PYTHON_DETECT
1015 for line in _PYTHON_DETECT.splitlines():
1016 if marker in line:
1017 return line.strip().split(")")[0]
1018 raise AssertionError(f"case arm containing {marker!r} not found in _PYTHON_DETECT")
1019
1020
1021def _sh_single_quote(value: str) -> str:

Calls

no outgoing calls

Tested by

no test coverage detected