Skip to content

Parameterized Generic Fields #20

@LiKenun

Description

@LiKenun

The validator is throwing a TypeError on class instantiation:

TypeError: isinstance() argument 2 cannot be a parameterized generic

Not sure if Python provides a way to take the type parameters and to check the values against them. I’m using them in a class like this:

@dataclass_validate(strict=True)
@dataclass
class GroupyGroup:
    items: tuple[int, ...]
    foo: float
    bar: float

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions