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

Class MappingKey

pre_commit/yaml_rewrite.py:18–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class MappingKey(NamedTuple):
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 2

_migrate_composedFunction · 0.90
test_mapping_keyFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_mapping_keyFunction · 0.72