MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / find_matches

Method find_matches

aura/pattern_matching.py:99–110  ·  view source on GitHub ↗

iterate over the list of compiled pattern matchers and attempt to match the pattern

(cls, value, signatures: list)

Source from the content-addressed store, hash-verified

97
98 @classmethod
99 def find_matches(cls, value, signatures: list):
100 """
101 iterate over the list of compiled pattern matchers and
102 attempt to match the pattern
103 """
104 if not isinstance(value, (str, nodes.String)):
105 return
106 value = str(value)
107
108 for s in signatures: # type: PatternMatcher
109 if s.match(value):
110 yield s
111
112
113class StringPatternMatcher(PatternMatcher, metaclass=ABCMeta):

Callers 3

test_string_matchingFunction · 0.80
node_StringMethod · 0.80
node_BytesMethod · 0.80

Calls 1

matchMethod · 0.45

Tested by 1

test_string_matchingFunction · 0.64