mirror of https://github.com/zulip/zulip.git
mypy: Use ‘strict’ option to enable (almost) all strictness flags.
The ‘strict’ configuration option has been supported since mypy 0.770, and I added it to their documentation in 0.920. https://mypy.readthedocs.io/en/stable/config_file.html#confval-strict This has the effect of enabling the new ‘strict_concatenate’ option from 0.950. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
483c84da61
commit
944c036df1
|
@ -17,23 +17,12 @@ show_traceback = true
|
||||||
mypy_path = "$MYPY_CONFIG_FILE_DIR/stubs"
|
mypy_path = "$MYPY_CONFIG_FILE_DIR/stubs"
|
||||||
cache_dir = "$MYPY_CONFIG_FILE_DIR/var/mypy-cache"
|
cache_dir = "$MYPY_CONFIG_FILE_DIR/var/mypy-cache"
|
||||||
|
|
||||||
# These are all the options that would be enabled by mypy --strict, in
|
# Enable strict mode, with some exceptions.
|
||||||
# the order listed by the mypy --help documentation of --strict. We
|
strict = true
|
||||||
# do not yet enable all of them.
|
|
||||||
warn_unused_configs = true
|
|
||||||
disallow_any_generics = true
|
|
||||||
disallow_subclassing_any = false
|
disallow_subclassing_any = false
|
||||||
disallow_untyped_calls = false
|
disallow_untyped_calls = false
|
||||||
disallow_untyped_defs = true
|
|
||||||
disallow_incomplete_defs = true
|
|
||||||
check_untyped_defs = true
|
|
||||||
disallow_untyped_decorators = false
|
disallow_untyped_decorators = false
|
||||||
no_implicit_optional = true
|
|
||||||
warn_redundant_casts = true
|
|
||||||
warn_unused_ignores = true
|
|
||||||
warn_return_any = false
|
warn_return_any = false
|
||||||
no_implicit_reexport = true
|
|
||||||
strict_equality = true
|
|
||||||
|
|
||||||
# Display the codes needed for # type: ignore[code] annotations.
|
# Display the codes needed for # type: ignore[code] annotations.
|
||||||
show_error_codes = true
|
show_error_codes = true
|
||||||
|
|
Loading…
Reference in New Issue