- cattrs version: 22.2.0
- Python version: 3.8
Description
def my_test():
@frozen
class A(Generic[T]):
a: int
b: T
@frozen
class B:
pass
cattrs.structure({"a": 1, "b": []}, A[Sequence[B]])
=> Syntax error
generated function name is: structure_A_typing_Sequence___main___my_test_<locals>_B_
name = re.sub(r"[\[\.\] ,]", "_", name) probably needs to have <> added to make it work :)