Strip `.copy()` / `.dict()` so `request.GET.copy()` still reads as the source.
(node: ast.expr)
| 366 | |
| 367 | |
| 368 | def _unwrap_copy(node: ast.expr) -> ast.expr: |
| 369 | """Strip `.copy()` / `.dict()` so `request.GET.copy()` still reads as the source.""" |
| 370 | while ( |
| 371 | isinstance(node, ast.Call) |
| 372 | and isinstance(node.func, ast.Attribute) |
| 373 | and node.func.attr in _COPY_METHODS |
| 374 | ): |
| 375 | node = node.func.value |
| 376 | return node |
| 377 | |
| 378 | |
| 379 | def _declared_elements(value: ast.expr) -> list[ast.expr]: |