Python's mypy has a special function called reveal_type() which asks the linter to display the type of variables.
PyCharm does not support it and instead shows the function as non-existing.
How can I display the type hint of a variable?
Python's mypy has a special function called reveal_type() which asks the linter to display the type of variables.
PyCharm does not support it and instead shows the function as non-existing.
How can I display the type hint of a variable?
By default, PyCharm binds the F1 key to the "display documentation" command.
When displaying the documentation, you're able to see the type of variables, function signatures, class signatures, and docstrings.
You're also able to view the type directly using ctrl+shift+P or by hovering with the mouse and pressing ctrl.
If you do not use the default keymap, you may navigate to View | Quick documentation: