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 conformance tests for Final dataclass fields #1741

Merged
merged 2 commits into from
May 20, 2024

Conversation

carljm
Copy link
Member

@carljm carljm commented May 20, 2024

Add conformance tests for the spec changes merged in #1669

None of the tested type checkers support nesting Final within ClassVar in dataclasses yet, so they all fail the automated conformance check. Mypy also requires a Final assignment in a dataclass body to be "initialized" (thus effectively requiring final dataclass fields to have a default). But all support the core behavior of defining a final dataclass field, so I marked them all as Partial.

Copy link
Collaborator

@erictraut erictraut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One minor comment.

conformance/results/mypy/dataclasses_final.toml Outdated Show resolved Hide resolved
@JelleZijlstra JelleZijlstra merged commit 2d2e8ee into python:main May 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants