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

Strict Mode for "Strict" Equivalence of Literals (type) #170

Open
rnag opened this issue Dec 29, 2024 · 0 comments
Open

Strict Mode for "Strict" Equivalence of Literals (type) #170

rnag opened this issue Dec 29, 2024 · 0 comments
Labels
enhancement New feature or request low-priority Low Priority self-created Opened by me!

Comments

@rnag
Copy link
Owner

rnag commented Dec 29, 2024

As per: Equivalence of two Literals

Two types Literal[v1] and Literal[v2] are equivalent when both of the following conditions are true:
type(v1) == type(v2)
v1 == v2

I would like to update deserialization for typing.Literal in v1 opt-in to account for this.

Perhaps a Meta setting strict_mode_for_literals: bool, or else more simply a strict: bool, can be added to support this feature / enhancement.

@rnag rnag added enhancement New feature or request low-priority Low Priority self-created Opened by me! labels Dec 29, 2024
@rnag rnag changed the title Enable Strict Check of Literals Support Strict Check of Literals Dec 29, 2024
@rnag rnag changed the title Support Strict Check of Literals Strict Mode for "Strict" Equivalence of Literals (types) Dec 29, 2024
@rnag rnag changed the title Strict Mode for "Strict" Equivalence of Literals (types) Strict Mode for "Strict" Equivalence of Literals (type) Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low-priority Low Priority self-created Opened by me!
Projects
None yet
Development

No branches or pull requests

1 participant