Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initializing TypedDict like a normal class fails #71

Open
FelixTheC opened this issue Sep 1, 2021 · 0 comments
Open

Initializing TypedDict like a normal class fails #71

FelixTheC opened this issue Sep 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@FelixTheC
Copy link
Owner

Describe the bug
When trying to create an instance of a TypedDict class in a way you would normaly create an instance. I got an error.

To Reproduce

@match_class_typing
class UserSelectedComponent(TypedDict):
    id: uuid.UUID
    min_concentration: float
    max_concentration: float

obj = UserSelectedComponent(
                id=uuid.UUID("f3567953-0f62-423b-9966-a8036b8fec25"),
                min_concentration=1.0,
                max_concentration=5.0,
            )

Expected behavior
An instance of UserSelectedComponent should be created, if the data is valid.

@FelixTheC FelixTheC added the bug Something isn't working label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant