mypy: Move configuration to pyproject.toml, with some modernization.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
3b4867ad46
commit
25c8123a80
2 changed files with 32 additions and 21 deletions
21
mypy.ini
21
mypy.ini
|
@ -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
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue