def _target_endpoint_pattern(path_pattern: str) -> Pattern[str]:
"""
Given a path pattern, return a regex which will match URLs to
patch for the Target API.
Args:
path_pattern: A part of the url which can be matched for endpoints.
For example `https://vws.vuforia.com/<this-part>`. This is
compiled to be a regular expression, so it may be `/foo` or
`/foo/.+` for example.
"""
base = 'https://vws.vuforia.com/' # type: str
joined = urljoin(base=base, url=path_pattern + '$')
return re.compile(joined)
评论列表
文章目录