MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / label_value

Function label_value

tools/commitlist.py:169–175  ·  view source on GitHub ↗
(labels: Iterable[str], prefix: str)

Source from the content-addressed store, hash-verified

167
168
169def label_value(labels: Iterable[str], prefix: str) -> str | None:
170 prefix_lower = prefix.casefold()
171 for label in labels:
172 if label.casefold().startswith(prefix_lower):
173 _, value = label.split(':', 1)
174 return value.strip()
175 return None
176
177
178def markdown_sections(body: str) -> dict[str, str]:

Callers 2

resolve_categoryFunction · 0.85
resolve_topicFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected