forked from VimPlug/jedi
Move Mypy config to pyproject.toml
This commit is contained in:
32
pyproject.toml
Normal file
32
pyproject.toml
Normal file
@@ -0,0 +1,32 @@
|
||||
[tool.mypy]
|
||||
# Exclude our copies of external stubs
|
||||
exclude = "^jedi/third_party"
|
||||
|
||||
show_error_codes = true
|
||||
enable_error_code = "ignore-without-code"
|
||||
|
||||
# Ensure generics are explicit about what they are (e.g: `List[str]` rather than
|
||||
# just `List`)
|
||||
disallow_any_generics = true
|
||||
|
||||
disallow_subclassing_any = true
|
||||
|
||||
# Avoid creating future gotchas emerging from bad typing
|
||||
warn_redundant_casts = true
|
||||
warn_unused_ignores = true
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
|
||||
warn_unreachable = true
|
||||
|
||||
# Require values to be explicitly re-exported; this makes things easier for
|
||||
# Flake8 too and avoids accidentally importing thing from the "wrong" place
|
||||
# (which helps avoid circular imports)
|
||||
implicit_reexport = false
|
||||
|
||||
strict_equality = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
# Various __init__.py files which contain re-exports we want to implicitly make.
|
||||
module = ["jedi", "jedi.inference.compiled", "jedi.inference.value", "parso"]
|
||||
implicit_reexport = true
|
||||
33
setup.cfg
33
setup.cfg
@@ -31,36 +31,3 @@ exclude =
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length = 100
|
||||
|
||||
|
||||
[mypy]
|
||||
# Exclude our copies of external stubs
|
||||
exclude = ^jedi/third_party
|
||||
|
||||
show_error_codes = true
|
||||
enable_error_code = ignore-without-code
|
||||
|
||||
# Ensure generics are explicit about what they are (e.g: `List[str]` rather than
|
||||
# just `List`)
|
||||
disallow_any_generics = True
|
||||
|
||||
disallow_subclassing_any = True
|
||||
|
||||
# Avoid creating future gotchas emerging from bad typing
|
||||
warn_redundant_casts = True
|
||||
warn_unused_ignores = True
|
||||
warn_return_any = True
|
||||
warn_unused_configs = True
|
||||
|
||||
warn_unreachable = True
|
||||
|
||||
# Require values to be explicitly re-exported; this makes things easier for
|
||||
# Flake8 too and avoids accidentally importing thing from the "wrong" place
|
||||
# (which helps avoid circular imports)
|
||||
implicit_reexport = False
|
||||
|
||||
strict_equality = True
|
||||
|
||||
[mypy-jedi,jedi.inference.compiled,jedi.inference.value,parso]
|
||||
# Various __init__.py files which contain re-exports we want to implicitly make.
|
||||
implicit_reexport = True
|
||||
|
||||
Reference in New Issue
Block a user