Skip to content

use Literal[_MISSING_TYPE.MISSING] for dataclasses.field defaults - #13256

Merged
srittau merged 1 commit into
python:mainfrom
tungol:dataclasses
Dec 18, 2024
Merged

srittau merged 1 commit into
python:mainfrom
tungol:dataclasses

Conversation

@tungol

@tungol tungol commented Dec 17, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

This comment has been minimized.

@yangdanny97

Copy link
Copy Markdown
Contributor

relevant old PR #5900

@tungol

tungol commented Dec 17, 2024

Copy link
Copy Markdown
Contributor Author

Thanks, I missed that while I was looking into it.

@tungol tungol closed this Dec 17, 2024
@tungol tungol reopened this Dec 17, 2024
@tungol

tungol commented Dec 17, 2024

Copy link
Copy Markdown
Contributor Author

That one was before we had the so-called enum trick in place. Idiomatic narrowing should work now, which makes this more viable.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit bd728fb into python:main Dec 18, 2024
@tungol
tungol deleted the dataclasses branch December 18, 2024 19:18
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