MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / match

Method match

pre_commit/yaml_rewrite.py:21–25  ·  view source on GitHub ↗
(self, n: Node)

Source from the content-addressed store, hash-verified

19 k: str
20
21 def match(self, n: Node) -> Generator[Node]:
22 if isinstance(n, MappingNode):
23 for k, _ in n.value:
24 if k.value == self.k:
25 yield k
26
27
28class MappingValue(NamedTuple):

Callers 1

test_mapping_keyFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_mapping_keyFunction · 0.76