MCPcopy Index your code
hub / github.com/fastapi/fastapi / _get_frontend_path

Method _get_frontend_path

fastapi/routing.py:2045–2053  ·  view source on GitHub ↗
(self, path: str, route_path: str)

Source from the content-addressed store, hash-verified

2043 return Match.FULL, child_scope
2044
2045 def _get_frontend_path(self, path: str, route_path: str) -> str | None:
2046 if path == "/":
2047 return route_path.lstrip("/")
2048 if route_path == path:
2049 return ""
2050 prefix = path + "/"
2051 if route_path.startswith(prefix):
2052 return route_path[len(prefix) :]
2053 return None
2054
2055 async def handle(self, scope: Scope, receive: Receive, send: Send) -> None:
2056 await self.app(scope, receive, send)

Callers 1

matches_with_pathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected