Skip to content

Use Literal for type#263

Merged
saghul merged 1 commit intosaghul:masterfrom
Dreamsorcerer:patch-4
Sep 10, 2025
Merged

Use Literal for type#263
saghul merged 1 commit intosaghul:masterfrom
Dreamsorcerer:patch-4

Conversation

@Dreamsorcerer
Copy link
Contributor

It seems that mypy treats the Final as a "context-sensitive" Literal, which unfortunately doesn't work as a union discriminator, as I previously hoped. It will require an explicit Literal type, which unfortunately introduces a bit of duplication.

@saghul saghul merged commit fb35158 into saghul:master Sep 10, 2025
40 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.

2 participants