Skip to content

DOC: Fixes Intelligent indexing example #11973

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

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

ChrisKeefe
Copy link
Contributor

Description

The final two reveal_type calls here appear to be incorrectly documented. (Index 1 holds a float, not a str)

image

To verify the error, run mypy against this gist or copy-paste the code from the public docs.

Fix

Using the same index across all of these tuple examples feels more readable to me than changing the reported type in the comments, but I'm happy to switch it up if anyone disagrees.

Test Plan

Docs build successfully:
image

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Thanks!

@JelleZijlstra JelleZijlstra merged commit 0bc040e into python:master Jan 12, 2022
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
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