-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Documentation : Adding missing reveal_type imports in cheat_sheet_py3.rst #20039
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might actually be better for overall documentation cohesion to not allow these to be runnable. But at the very least part of the examples is now incorrect!
Are you sure this is warranted? Usually you use |
Here is why it was added :
I don't see why it would be best NOT to import it from typing in the documentation example. Even if the Also, it has nothing to do with mypy, but the cheat sheet is the first link the beginners in typing has been sent to by the official python doc, so I think it's best to have regular runnable python as much as we can, not just checkable, especially when it costs nothing more than adding an import. |
When we added |
I modified the note instead, but I still believe it's not at all beginner friendly to refer to a note 100 lines lower in the cheat sheet instead of just making the code runnable... |
Minor documentation fix : Some methods in the cheat_sheet didn't work because of a missing import