Skip to content

Instantly share code, notes, and snippets.

@CodeByAidan
Last active February 27, 2024 21:47
Show Gist options
  • Save CodeByAidan/adb2b9e188256def1fe35b932cba7eb8 to your computer and use it in GitHub Desktop.
Save CodeByAidan/adb2b9e188256def1fe35b932cba7eb8 to your computer and use it in GitHub Desktop.
Personal mypy config! Includes EVERY DEFAULT OPTION!
[mypy]
; The mypy configurations below are my personal preferences.
check_untyped_defs = True
disallow_any_generics = True
disallow_any_unimported = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_decorators = True
disallow_untyped_defs = True
ignore_missing_imports = True
no_implicit_optional = True
pretty = True
show_column_numbers = True
show_error_codes = True
show_error_context = True
strict_equality = True
warn_return_any = True
warn_unused_ignores = True
; All of this below is just defaults:
; -----------------------------------
; (if any flags are commented out with a = and nothing after it,
; it means there is no default value/custom)
; ex. ; mypy_path =
; -----------------------------------
; (if any flags are commented out with a = and a value after it,
; it means that is the default value but it was changed out for
; my personal preference in my config above)
; ex. ; ignore_missing_imports = False
; == Import discovery ==
; mypy_path =
; files =
; modules =
; packages =
; exclude =
namespace_packages = True
explicit_package_bases = False
; ignore_missing_imports = False
follow_imports = normal
follow_imports_for_stubs = False
; python_executable =
no_site_packages = False
no_silence_site_packages = False
; == Platform configuration ==
; python_version =
; platform =
; always_true =
; always_false =
; == Disallow dynamic typing ==
; disallow_any_unimported = False
disallow_any_expr = False
disallow_any_decorated = False
disallow_any_explicit = False
; disallow_any_generics = False
; disallow_subclassing_any = False
; == Untyped definitions and calls ==
; disallow_untyped_calls = False
; untyped_calls_exclude =
; disallow_untyped_defs = False
disallow_incomplete_defs = False
; check_untyped_defs = False
; disallow_untyped_decorators = False
; == None and Optional handling ==
implicit_optional = False
strict_optional = True
; == Configuring warnings ==
warn_redundant_casts = False
; warn_unused_ignores = False
warn_no_return = True
; warn_return_any = False
warn_unreachable = False
; == Suppressing errors ==
ignore_errors = False
; == Miscellaneous strictness flags ==
allow_untyped_globals = False
allow_redefinition = False
local_partial_types = False
; disable_error_code =
; enable_error_code =
implicit_reexport = True
strict_concatenate = False
; strict_equality = False
strict = False
; == Configuring error messages ==
; show_error_context = False
; show_column_numbers = False
hide_error_codes = False
; pretty = False
color_output = True
error_summary = True
show_absolute_path = False
force_uppercase_builtins = False
force_union_syntax = False
; == Incremental mode ==
incremental = True
cache_dir = .mypy_cache
sqlite_cache = False
cache_fine_grained = False
skip_version_check = False
skip_cache_mtime_checks = False
; == Advanced options ==
; plugins =
pdb = False
show_traceback = False
raise_exceptions = False
; custom_typing_module =
; custom_typeshed_dir =
warn_incomplete_stub = False
; == Report generation ==
; any_exprs_report =
; cobertura_xml_report = ; pip install mypy[reports]
; html_report = ; pip install mypy[reports]
; xslt_html_report = ; pip install mypy[reports]
; linecount_report =
; linecoverage_report =
; lineprecision_report =
; txt_report = ; pip install mypy[reports]
; xslt_txt_report = ; pip install mypy[reports]
; xml_report = ; pip install mypy[reports]
; == Miscellaneous ==
; junit_xml =
scripts_are_modules = False
warn_unused_configs = False
verbosity = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment