## Objective Run [mypy](https://mypy.readthedocs.io/en/stable/) on your Python code to perform static typing checks, ensuring better code reliability and readability. `mypy` is a Python tool that checks the types of variables, function return values, and more. ### Global Configuration of mypy To add configuration to `mypy` shared with any other usage of mypy (such as manual run, pre-commit, etc), you can use `mypy.ini`, `setup.cfg` or `pyproject.toml` configuration file. Learn more about [mypy configuration](https://mypy.readthedocs.io/en/stable/config_file.html) files. ## How to use it 1. Configure the `mypy.ini`, `setup.cfg` or `pyproject.toml` file in your repository's root directory with your desired rules. 2. Include the mypy template in your CI/CD configuration (see quick use above). 3. If you need to customize the job, check the [jobs customization](https://docs.r2devops.io/get-started/use-templates/#job-templates-customization). ## Add a <a href="https://mypy.readthedocs.io/"><img alt="Type Checked: mypy" src="https://img.shields.io/badge/mypy-checks-blue"></a> Badge to your project README.md To display the use of mypy in your project, you can add the following badge to your README.md: ```markdown <a href="https://mypy.readthedocs.io/"> <img alt="Type Checked: mypy" src="https://img.shields.io/badge/mypy-checks-blue"> </a> ```