-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
bug: A dataclass field with init=False should not be a parameter #233
Comments
Parameters for dataclasses are currently dynamically created when accessing the class' |
I haven't looked at the how the parameters are generated, but I have a temporary solution that inspects Obviously this does not handle the cases when |
Yes, that's what we'll use in Griffe too (thanks for the link). Just not in the parameters property as it's not extensible :) Regarding indirections (hiding the field call in other functions), that won't be supported statically, and users will have to rely on dynamic analysis. |
Here are failing tests.
Then there are the perhaps more complicated cases to deal with statically where the
field
class is wrapped inside another function e.g.The text was updated successfully, but these errors were encountered: