diff options
| author | Anton Bobov <anton@bobov.name> | 2024-08-21 20:21:20 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2024-08-21 23:22:07 +0500 |
| commit | b7d2a7a1807802ec8385f44651658a9eaa98c141 (patch) | |
| tree | 40ab2c84fbddb6bf7a90febe2811b7375dd5a1ad | |
| parent | 880a3eee62061839c1faa330ec6096ff7ec667a6 (diff) | |
mypy: Add myppy config
| -rw-r--r-- | files/.config/mypy/config | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/files/.config/mypy/config b/files/.config/mypy/config new file mode 100644 index 0000000..aa90124 --- /dev/null +++ b/files/.config/mypy/config @@ -0,0 +1,59 @@ +# vim: ft=confini : +# https://mypy.readthedocs.io/en/stable/config_file.html +[mypy] + +############################################################################### +# Configuring error messages +############################################################################### + +# Use visually nicer output in error messages: use soft word wrap, show source +# code snippets, and show error location markers. +pretty = True + +############################################################################### +# Incremental mode +############################################################################### + +# Specifies the location where mypy stores incremental cache info. +cache_dir = ~/.cache/mypy + +############################################################################### +# Configuring warnings +############################################################################### + +# Warns about casting an expression to its inferred type. +warn_redundant_casts = True + +# Warns about unneeded # type: ignore comments. +warn_unused_ignores = True + +# Shows a warning when returning a value with type Any from a function declared +# with a non- Any return type. +warn_return_any = True + +# Shows a warning when encountering any code inferred to be unreachable or +# redundant after performing type analysis. +warn_unreachable = True + +############################################################################### +# Untyped definitions and calls +############################################################################### + +# Disallows defining functions without type annotations or with incomplete type +# annotations (a superset of disallow_incomplete_defs). +disallow_untyped_defs = True + +# Type-checks the interior of functions without type annotations. +check_untyped_defs = True + +############################################################################### +# Import discovery +############################################################################### + +# Suppresses error messages about imports that cannot be resolved. +ignore_missing_imports = True + +# Directs what to do with imports when the imported module is found as a .py +# file and not part of the files, modules and packages provided on the command +# line. +follow_imports = silent |
