MCPcopy Create free account
hub / github.com/python-hyper/uritemplate / replace_partial

Method replace_partial

uritemplate/template.py:113–116  ·  view source on GitHub ↗
(match: "re.Match[str]")

Source from the content-addressed store, hash-verified

111 return expanded.get(match.groups()[0], "")
112
113 def replace_partial(match: "re.Match[str]") -> str:
114 match_group = match.groups()[0]
115 var = "{%s}" % match_group
116 return expanded.get(match_group) or var
117
118 replace_func = replace_partial if replace else replace_all
119

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected