(self, scope: Scope)
| 321 | self.path_regex, self.path_format, self.param_convertors = compile_path(path) |
| 322 | |
| 323 | def matches(self, scope: Scope) -> tuple[Match, Scope]: |
| 324 | path_params: dict[str, Any] |
| 325 | if scope["type"] == "websocket": |
| 326 | route_path = get_route_path(scope) |
| 327 | match = self.path_regex.match(route_path) |
| 328 | if match: |
| 329 | matched_params = match.groupdict() |
| 330 | for key, value in matched_params.items(): |
| 331 | matched_params[key] = self.param_convertors[key].convert(value) |
| 332 | path_params = dict(scope.get("path_params", {})) |
| 333 | path_params.update(matched_params) |
| 334 | child_scope = {"endpoint": self.endpoint, "path_params": path_params} |
| 335 | return Match.FULL, child_scope |
| 336 | return Match.NONE, {} |
| 337 | |
| 338 | def url_path_for(self, name: str, /, **path_params: Any) -> URLPath: |
| 339 | seen_params = set(path_params.keys()) |
nothing calls this directly
no test coverage detected