(self, scope: Scope, receive: Receive, send: Send)
| 604 | self.middleware_stack = cls(self.middleware_stack, *args, **kwargs) |
| 605 | |
| 606 | async def not_found(self, scope: Scope, receive: Receive, send: Send) -> None: |
| 607 | if scope[class="st">"type"] == class="st">"websocket": |
| 608 | websocket_close = WebSocketClose() |
| 609 | await websocket_close(scope, receive, send) |
| 610 | return |
| 611 | |
| 612 | class="cm"># If we're running inside a starlette application then raise an |
| 613 | class="cm"># exception, so that the configurable exception handler can deal with |
| 614 | class="cm"># returning the response. For plain ASGI apps, just return the response. |
| 615 | if class="st">"app" in scope: |
| 616 | raise HTTPException(status_code=404) |
| 617 | else: |
| 618 | response = PlainTextResponse(class="st">"Not Found", status_code=404) |
| 619 | await response(scope, receive, send) |
| 620 | |
| 621 | def url_path_for(self, name: str, /, **path_params: Any) -> URLPath: |
| 622 | for route in self.routes: |
nothing calls this directly
no test coverage detected