Value of keyword `name` from every `@extend_schema` in `decorators`.
(decorators: list[ast.expr], name: str)
| 318 | |
| 319 | |
| 320 | def extend_schema_kwarg(decorators: list[ast.expr], name: str) -> Generator[ast.expr]: |
| 321 | """Value of keyword `name` from every `@extend_schema` in `decorators`.""" |
| 322 | for dec in decorators: |
| 323 | if not is_extend_schema(dec): |
| 324 | continue |
| 325 | assert isinstance(dec, ast.Call) |
| 326 | for kw in dec.keywords: |
| 327 | if kw.arg == name: |
| 328 | yield kw.value |
| 329 | |
| 330 | |
| 331 | _QUERY_ATTRS = frozenset(("GET", "query_params")) |
no test coverage detected