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

Method get_patterns

aura/pattern_matching.py:62–76  ·  view source on GitHub ↗
(cls, initialize=False)

Source from the content-addressed store, hash-verified

60
61 @classmethod
62 def get_patterns(cls, initialize=False) -> Mapping[str, PatternMatcher]:
63 global PATTERN_CACHE
64
65 if PATTERN_CACHE is None:
66 PATTERN_CACHE = {}
67 initialize = True
68
69 if initialize:
70 for x in cls.__subclasses__(): # type: PatternMatcher
71 if inspect.isabstract(x):
72 x.get_patterns(initialize=initialize)
73 else:
74 PATTERN_CACHE[x.pattern_type] = x
75
76 return PATTERN_CACHE
77
78 @classmethod
79 def compile_patterns(cls, signatures: List[dict]) -> List[PatternMatcher]:

Callers 1

compile_patternsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected