Skip to content

Dictionary unpacking with object that doesn't inherit from collections.abc.Mapping #1375

Answered by bryanforbes
bryanforbes asked this question in Q&A
Discussion options

You must be logged in to vote

Now that mypy has released support for SupportsKeysAndGetItem being destructured in 1.3, the answer to this question is to upgrade mypy or pyright and it will work. Thanks for the help, @AlexWaygood and @erictraut!

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@AlexWaygood
Comment options

@bryanforbes
Comment options

@AlexWaygood
Comment options

@erictraut
Comment options

@bryanforbes
Comment options

Comment options

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

Answer selected by bryanforbes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants