This is being raised as a potential comprehension, which is impossible
def should_not_be_a_list_comprehension(args):
"""Internal helper for get_args."""
res = []
for arg in args:
if not isinstance(arg, tuple):
res.append(arg)
elif is_callable_type(arg[0]):
if len(arg) == 2:
res.append(Callable[[], arg[1]])
elif arg[1] is Ellipsis:
res.append(Callable[..., arg[2]])
else:
res.append(Callable[list(arg[1:-1]), arg[-1]])
else:
res.append(type(arg[0]).__getitem__(arg[0], _eval_args(arg[1:])))
return tuple(res)
This is being raised as a potential comprehension, which is impossible