Skip to content

Bug Report: Possible regression in typer 0.12.4 with list of union argument parsing #943

Answered by aldbr
aldbr asked this question in Questions
Discussion options

You must be logged in to vote

Thanks a lot for the detailed explanation 🙂

Using the get_origin() method however, the variants with | refer to types.UnionType which will be seen as a _typing.is_union() case, which then feels more consistent overall because you'd get the same result with any of the notations.

Yes I agree - it does feel more consistent overall, and seems to be the right approach.

If it does - I'm starting to wonder whether your use-case from the example code snippet sort of "worked by accident" in 0.12.3. And if it did, then can't we make it work on purpose going forward 😁

Yes I also think that it "worked by accident", but it worked nonetheless. This makes me wonder whether it makes sense to completely

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@svlandeg
Comment options

Answer selected by svlandeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants