(arg)
| 86 | """Get python values equivalent to the variable tracker args""" |
| 87 | |
| 88 | def map_arg(arg): |
| 89 | if isinstance(arg, ConstantVariable): |
| 90 | return arg.as_python_constant() |
| 91 | elif isinstance(arg, ListVariable) and not arg.items: |
| 92 | return [] |
| 93 | elif ( |
| 94 | isinstance(arg, ConstDictVariable) |
| 95 | and isinstance(arg.source, GetItemSource) |
| 96 | and isinstance(arg.source.base, AttrSource) |
| 97 | and arg.source.base.member == "param_groups" |
| 98 | ): |
| 99 | return self.value.param_groups[arg.source.index] |
| 100 | |
| 101 | raise ArgMappingException() |
| 102 | |
| 103 | new_args = [map_arg(arg) for arg in args] |
| 104 | new_kwargs = {k: map_arg(v) for k, v in kwargs.items()} |
no test coverage detected