Default MyPy type hint checks with mypy.ini

MyPy is a Python type hint checker. MyPy recursively checks all files in a Python project by typing:

mypy ~/myproject

It’s often useful to have a per-project MyPy configuration file to avoid excessive command line options. We typically put a file mypy.ini in each Python project containing:

[mypy]
ignore_missing_imports = True
strict_optional = False
allow_redefinition = True
show_error_context = False
show_column_numbers = True

One can make a system-wide ~/mypy.ini, that is overriden by the per-project mypy.ini.