Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 888 Bytes

dj_mypy.md

File metadata and controls

54 lines (40 loc) · 888 Bytes

mypy configuration for django project

mypy.ini:

[mypy]

ignore_missing_imports: True

# Optionals
no_implicit_optional = True

# Strictness
allow_untyped_globals = False
allow_redefinition = False
implicit_reexport = False
strict_equality = True

# Warnings
warn_unused_ignores = True
warn_no_return = True
warn_return_any = True
warn_redundant_casts = True
warn_unreachable = True

# Error output
show_column_numbers = True
show_error_context = True
show_error_codes = True
show_traceback = True
pretty = True
color_output = True
error_summary = True

plugins =
  mypy_django_plugin.main,
  mypy_drf_plugin.main

[mypy-colors]
ignore_missing_imports = True

[mypy-translate]
ignore_missing_imports = True

[mypy-pytest]
ignore_missing_imports = True

[mypy.plugins.django-stubs]
django_settings_module = "{app_name}.settings"

[mypy-*.migrations.*]
ignore_errors: True