(
node: t.Union["_FilterTestCommon", "Call"], eval_ctx: t.Optional[EvalContext]
)
| 716 | |
| 717 | |
| 718 | def args_as_const( |
| 719 | node: t.Union["_FilterTestCommon", "Call"], eval_ctx: t.Optional[EvalContext] |
| 720 | ) -> t.Tuple[t.List[t.Any], t.Dict[t.Any, t.Any]]: |
| 721 | args = [x.as_const(eval_ctx) for x in node.args] |
| 722 | kwargs = dict(x.as_const(eval_ctx) for x in node.kwargs) |
| 723 | |
| 724 | if node.dyn_args is not None: |
| 725 | try: |
| 726 | args.extend(node.dyn_args.as_const(eval_ctx)) |
| 727 | except Exception as e: |
| 728 | raise Impossible() from e |
| 729 | |
| 730 | if node.dyn_kwargs is not None: |
| 731 | try: |
| 732 | kwargs.update(node.dyn_kwargs.as_const(eval_ctx)) |
| 733 | except Exception as e: |
| 734 | raise Impossible() from e |
| 735 | |
| 736 | return args, kwargs |
| 737 | |
| 738 | |
| 739 | class _FilterTestCommon(Expr): |
no test coverage detected