MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / match

Method match

aura/pattern_matching.py:136–146  ·  view source on GitHub ↗
(self, value: ScanLocation)

Source from the content-addressed store, hash-verified

134 return f"<FilePatternMatcher({repr(self._signature)})>"
135
136 def match(self, value: ScanLocation) -> bool:
137 if self._signature.get("target", "full") == "full":
138 targets = (str(value.location),)
139 elif self._signature["target"] == "part":
140 targets = value.location.parts
141 elif self._signature["target"] == "filename":
142 targets = (value.location.name,)
143 else:
144 raise ValueError(f"Unknown pattern target: '{self._signature['target']}'")
145
146 return any(self.__compiled.match(x) for x in targets)
147
148
149class RegexPattern(StringPatternMatcher):

Callers 1

test_file_patternsFunction · 0.95

Calls 2

getMethod · 0.80
matchMethod · 0.45

Tested by 1

test_file_patternsFunction · 0.76