MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / Match

Function Match

rtpose_wrapper/scripts/cpp_lint.py:515–522  ·  view source on GitHub ↗

Matches the string with the pattern, caching the compiled regexp.

(pattern, s)

Source from the content-addressed store, hash-verified

513 linenum in _error_suppressions.get(None, set()))
514
515def Match(pattern, s):
516 """Matches the string with the pattern, caching the compiled regexp."""
517 # The regexp compilation caching is inlined in both Match and Search for
518 # performance reasons; factoring it out into a separate function turns out
519 # to be noticeably expensive.
520 if pattern not in _regexp_compile_cache:
521 _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
522 return _regexp_compile_cache[pattern].match(s)
523
524
525def ReplaceAll(pattern, rep, s):

Callers 15

IsInAlphabeticalOrderMethod · 0.85
CheckMethod · 0.85
CleanseRawStringsFunction · 0.85
__init__Method · 0.85
CheckEndMethod · 0.85
CheckEndMethod · 0.85
UpdatePreprocessorMethod · 0.85
UpdateMethod · 0.85
CheckForFunctionLengthsFunction · 0.85
CheckAccessFunction · 0.85
CheckSpacingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected