Documentation : Adding missing reveal_type imports in cheat_sheet_py3.rst#20039
Documentation : Adding missing reveal_type imports in cheat_sheet_py3.rst#20039GeoffreyOnRails wants to merge 3 commits into
Conversation
A5rocks
left a comment
There was a problem hiding this comment.
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