MCPcopy Index your code
hub / github.com/buildbot/buildbot / compileEventPathPatterns

Method compileEventPathPatterns

master/buildbot/data/base.py:63–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 self.compileEventPathPatterns()
62
63 def compileEventPathPatterns(self):
64 # We'll run a single format, to get the final event path tuple
65 pathPatterns = self.eventPathPatterns
66 if isinstance(pathPatterns, str):
67 pathPatterns = pathPatterns.split()
68 warn_deprecated(
69 '4.3.0',
70 'ResourceType.eventPathPatterns as a multiline string is deprecated. Use '
71 'eventPathPatterns as a list of strings instead.',
72 )
73 identifiers = re.compile(r':([^/]*)')
74 for i, pp in enumerate(pathPatterns):
75 pp = identifiers.sub(r'{\1}', pp)
76 if pp.startswith("/"):
77 pp = pp[1:]
78 pathPatterns[i] = pp
79 self.eventPaths = pathPatterns
80
81 @functools.lru_cache(1) # noqa: B019
82 def getEndpoints(self):

Callers 1

__init__Method · 0.95

Calls 1

warn_deprecatedFunction · 0.90

Tested by

no test coverage detected