Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ For more information on how to use these flags, see :ref:`version_and_platform_c
run under Python version X.Y. Without this option, mypy will default to using
whatever version of Python is running mypy.

This flag affects type checking behavior such as version and platform
checks, but mypy still uses the parser from the Python interpreter running
mypy. To type check code using syntax from a newer Python version, run mypy
with an interpreter that supports that syntax.

This flag will attempt to find a Python executable of the corresponding
version to search for :pep:`561` compliant packages. If you'd like to
disable this, use the :option:`--no-site-packages` flag (see
Expand Down
5 changes: 5 additions & 0 deletions docs/source/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ Platform configuration
for example ``3.10``. The default is the version of the Python
interpreter used to run mypy.

This setting affects type checking behavior such as version and platform
checks, but mypy still uses the parser from the Python interpreter running
mypy. To type check code using syntax from a newer Python version, run mypy
with an interpreter that supports that syntax.

This option may only be set in the global section (``[mypy]``).

.. confval:: platform
Expand Down
Loading