diff --git a/docs/source/common_issues.rst b/docs/source/common_issues.rst index 96d73e5f0399..a870c52c53d2 100644 --- a/docs/source/common_issues.rst +++ b/docs/source/common_issues.rst @@ -505,11 +505,15 @@ to see the types of all local variables at once. Example: # b: builtins.str .. note:: - ``reveal_type`` and ``reveal_locals`` are only understood by mypy and - don't exist in Python. If you try to run your program, you'll have to - remove any ``reveal_type`` and ``reveal_locals`` calls before you can - run your code. Both are always available and you don't need to import - them. + ``reveal_type`` and ``reveal_locals`` are handled specially by mypy during + type checking, and don't have to be defined or imported. + + However, if you want to run your code, + you'll have to remove any ``reveal_type`` and ``reveal_locals`` + calls from your program or else Python will give you an error at runtime. + + Alternatively, you can import ``reveal_type`` from ``typing_extensions`` + or ``typing`` (on Python 3.11 and newer) .. _silencing-linters: