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

stubtest: treat dicts as a subtype of typeddict #12040

Merged
merged 3 commits into from
Jan 23, 2022

Conversation

hauntsaninja
Copy link
Collaborator

@JelleZijlstra
Copy link
Member

Is it easy to unit test this?

opt2: _Options
""",
runtime="""
opt1 = {"some": "stuff"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fail if stubtest was smarter, let's make this a test case where it really should pass

Suggested change
opt1 = {"some": "stuff"}
opt1 = {"a": "stuff", "b": 4}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, did this to document the behaviour, but just added a third correct case

@JelleZijlstra JelleZijlstra merged commit 6d24332 into python:master Jan 23, 2022
@hauntsaninja hauntsaninja deleted the stubttpd branch January 23, 2022 04:28
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