mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-13 22:48:55 +08:00
Introduce some stricter typing
This commit is contained in:
1 parent
c7481b3319
commit
30ef824abd
28 files changed
+171
-67
No files matched your search
+1
-15
@@ -1,4 +1,4 @@
|
||||
[tool.mypy]
|
||||
[tool.zuban]
|
||||
# Exclude our copies of external stubs
|
||||
exclude = "^jedi/third_party"
|
||||
|
||||
@@ -8,25 +8,11 @@ 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
|
||||
Reference in new issue
Block a user