reveal_type
is a special function provided by MyPy (a static type checker for Python) and is not a standard Python built-in function.
reveal_type
is designed to be used only when you run MyPy to check your code's types. It fails when using the normal python interpreter because there are no variables/module/function called reveal_type
.
You can run your python script (let's assume it's called "my_script.py")
mypy my_script.py
(provided you have mypy installed) but not as
python my_script.py