(self)
| 187 | |
| 188 | @property |
| 189 | def state(self) -> StateT: |
| 190 | if not hasattr(self, "_state"): |
| 191 | # Ensure 'state' has an empty dict if it's not already populated. |
| 192 | self.scope.setdefault("state", {}) |
| 193 | # Create a state instance with a reference to the dict in which it should |
| 194 | # store info |
| 195 | self._state = State(self.scope["state"]) |
| 196 | return cast(StateT, self._state) |
| 197 | |
| 198 | def url_for(self, name: str, /, **path_params: Any) -> URL: |
| 199 | url_path_provider: Router | Starlette | None = self.scope.get("router") or self.scope.get("app") |
nothing calls this directly
no test coverage detected