MCPcopy
hub / github.com/hugapi/hug / where

Method where

hug/routing.py:601–615  ·  view source on GitHub ↗
(self, **overrides)

Source from the content-addressed store, hash-verified

599 return self.where(prefixes=prefixes, **overrides)
600
601 def where(self, **overrides):
602 if "urls" in overrides:
603 existing_urls = self.route.get("urls", ())
604 use_urls = []
605 for url in (
606 (overrides["urls"],) if isinstance(overrides["urls"], str) else overrides["urls"]
607 ):
608 if url.startswith("/") or not existing_urls:
609 use_urls.append(url)
610 else:
611 for existing in existing_urls:
612 use_urls.append(urljoin(existing.rstrip("/") + "/", url))
613 overrides["urls"] = tuple(use_urls)
614
615 return super().where(**overrides)

Callers 15

urlsMethod · 0.95
acceptMethod · 0.95
getMethod · 0.95
deleteMethod · 0.95
postMethod · 0.95
putMethod · 0.95
traceMethod · 0.95
patchMethod · 0.95
optionsMethod · 0.95
headMethod · 0.95
connectMethod · 0.95
callMethod · 0.95

Calls 2

getMethod · 0.45
whereMethod · 0.45

Tested by

no test coverage detected