MCPcopy Create free account
hub / github.com/celery/celery / resolve

Function resolve

celery/utils/text.py:127–135  ·  view source on GitHub ↗
(match: Match)

Source from the content-addressed store, hash-verified

125 keys.setdefault('%', '%')
126
127 def resolve(match: Match) -> str | Any:
128 key = match.expand(expand)
129 try:
130 resolver = keys[key]
131 except KeyError:
132 raise ValueError(UNKNOWN_SIMPLE_FORMAT_KEY.format(key, s))
133 if callable(resolver):
134 return resolver()
135 return resolver
136
137 return pattern.sub(resolve, s)
138 return s

Callers

nothing calls this directly

Calls 2

expandMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected