diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index b0c763c9..00000000 --- a/mypy.ini +++ /dev/null @@ -1,21 +0,0 @@ -[mypy] -mypy_path = - $MYPY_CONFIG_FILE_DIR/stubs, - $MYPY_CONFIG_FILE_DIR/zulip, - $MYPY_CONFIG_FILE_DIR/zulip_bots, - $MYPY_CONFIG_FILE_DIR/zulip_botserver, -explicit_package_bases = True - -check_untyped_defs = True -disallow_any_generics = True -strict_optional = True -no_implicit_optional = True - -incremental = True -scripts_are_modules = True -show_traceback = True - -warn_no_return = True -warn_redundant_casts = True -warn_unused_ignores = True -warn_unreachable = True diff --git a/pyproject.toml b/pyproject.toml index 90f80c01..c893c1c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,38 @@ src_paths = [ profile = "black" line_length = 100 +[tool.mypy] +mypy_path = [ + "$MYPY_CONFIG_FILE_DIR/stubs", + "$MYPY_CONFIG_FILE_DIR/zulip", + "$MYPY_CONFIG_FILE_DIR/zulip_bots", + "$MYPY_CONFIG_FILE_DIR/zulip_botserver", +] +explicit_package_bases = true + +incremental = true +scripts_are_modules = true +show_traceback = true + +# Enable strict mode, with some exceptions. +strict = true +disallow_subclassing_any = false +disallow_untyped_calls = false +disallow_untyped_decorators = false +warn_return_any = false +no_implicit_reexport = false + +# Enable optional errors. +enable_error_code = [ + "redundant-self", + "truthy-bool", + "truthy-iterable", + "unused-awaitable", +] + +# Other options. +warn_unreachable = true + [tool.pytest.ini_options] pythonpath = [ "zulip",