Skip to content

Make result.type Final#246

Merged
saghul merged 1 commit intosaghul:masterfrom
Dreamsorcerer:patch-3
Jul 10, 2025
Merged

Make result.type Final#246
saghul merged 1 commit intosaghul:masterfrom
Dreamsorcerer:patch-3

Conversation

@Dreamsorcerer
Copy link
Contributor

Making these Final allows a type checker to infer them as Literal['A'] etc. rather than just str.
This can then be used for handling unions of results (e.g. if result.type == "A": result.host).

@saghul saghul merged commit 881a3a1 into saghul:master Jul 10, 2025
29 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