.. SPDX-FileCopyrightText: 2021 Veit Schiele .. .. SPDX-License-Identifier: BSD-3-Clause Mypy ==== With `Mypy `_ you can do a static type check. .. seealso:: * `Home `_ * `GitHub `_ * `Docs `_ * `PyPI `_ * `Using Mypy in production at Spring `_ Installation ------------ Mypy requires Python≥3.5. Then it can be installed, for example with: .. code-block:: console $ uv add mypy Check ----- Then you can check it, for example with: .. code-block:: console $ uv run mypy myprogram.py .. note:: Although Mypy needs to be installed with Python3, it can also parse Python2 code, for example with: .. code-block:: console $ uv run mypy --py2 myprogram.py