@@ -218,6 +218,14 @@ daemon <mypy_daemon>`, which can speed up incremental mypy runtimes by
218218a factor of 10 or more. :ref: `Remote caching <remote-cache >` can
219219make cold mypy runs several times faster.
220220
221+ Furthermore: as of `mypy 1.13 <https://mypy-lang.blogspot.com/2024/10/mypy-113-released.html >`_,
222+ mypy allows use of the orjson library for handling the cache instead of the stdlib json, for
223+ improved performance. You can ensure the presence of orjson using the faster-cache extra:
224+
225+ python3 -m pip install -U mypy[faster-cache]
226+
227+ Mypy may depend on orjson by default in the future.
228+
221229Types of empty collections
222230--------------------------
223231
@@ -505,11 +513,15 @@ to see the types of all local variables at once. Example:
505513 # b: builtins.str
506514 .. note ::
507515
508- ``reveal_type `` and ``reveal_locals `` are only understood by mypy and
509- don't exist in Python. If you try to run your program, you'll have to
510- remove any ``reveal_type `` and ``reveal_locals `` calls before you can
511- run your code. Both are always available and you don't need to import
512- them.
516+ ``reveal_type `` and ``reveal_locals `` are handled specially by mypy during
517+ type checking, and don't have to be defined or imported.
518+
519+ However, if you want to run your code,
520+ you'll have to remove any ``reveal_type `` and ``reveal_locals ``
521+ calls from your program or else Python will give you an error at runtime.
522+
523+ Alternatively, you can import ``reveal_type `` from ``typing_extensions ``
524+ or ``typing `` (on Python 3.11 and newer)
513525
514526.. _silencing-linters :
515527
0 commit comments