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

Add support for Final #107

Closed
Fatal1ty opened this issue May 4, 2023 · 2 comments · Fixed by #113
Closed

Add support for Final #107

Fatal1ty opened this issue May 4, 2023 · 2 comments · Fixed by #113
Assignees
Labels
enhancement New feature or request

Comments

@Fatal1ty
Copy link
Owner

Fatal1ty commented May 4, 2023

Is your feature request related to a problem? Please describe.

Final has been added in PEP 591 as an alternative to class variables. We can use it on a par with ClassVar for discriminator values:

Describe the solution you'd like

We should skip them as we do with ClassVar variables.

@Fatal1ty Fatal1ty added the enhancement New feature or request label May 4, 2023
@Fatal1ty Fatal1ty self-assigned this May 4, 2023
@Fatal1ty
Copy link
Owner Author

Fatal1ty commented Jun 4, 2023

Seems like current behaviour in Python is not to treat Final attributes inside dataclasses as ClassVars:

We should do the same.

@Fatal1ty
Copy link
Owner Author

Fatal1ty commented Jun 8, 2023

Closed by #113

@Fatal1ty Fatal1ty closed this as completed Jun 8, 2023
@Fatal1ty Fatal1ty linked a pull request Jun 12, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant