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

Support positional arguments for dataclasses #88

Closed
dmontagu opened this issue Nov 24, 2019 · 2 comments
Closed

Support positional arguments for dataclasses #88

dmontagu opened this issue Nov 24, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@dmontagu
Copy link
Contributor

It looks like arguments to pydantic dataclasses are treated as keyword-only, but actually the arguments to dataclasses are always positional (whether it is a pydantic dataclass or a built-in dataclass).

Screen Shot 2019-11-24 at 11 41 47 AM

I generally prefer to drop the keywords when using dataclasses since it results in shorter calls, and I can be confident the ordering is right since the creation is happening in my own code.

@koxudaxi
Copy link
Owner

@dmontagu

Thank you for creating these issues.
I have fixed it, and It will be released next version.

BTW, I discuss to support pydantic dataclasses by PyCharm with JetBrains developer.
They will support it as an extra entry point for the third party dataclasess library.
It means we will not need to support dataclass on this plugin. Of course, I will continue to support useful autocompletion.
If I catch the result then, I will tell it to you and other people on pydantic issues.

@koxudaxi
Copy link
Owner

It was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants