Move mypy config to pyproject
Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
This commit is contained in:
parent
15fb3e762a
commit
1758fef747
|
@ -16,6 +16,5 @@ repos:
|
||||||
rev: v1.11.2
|
rev: v1.11.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
files: ^(src/cloudevents/)
|
args: [ "--config-file", "pyproject.toml" ]
|
||||||
types: [ python ]
|
types: [ python ]
|
||||||
args: [ ]
|
|
||||||
|
|
20
mypy.ini
20
mypy.ini
|
@ -1,20 +0,0 @@
|
||||||
[mypy]
|
|
||||||
python_version = 3.9
|
|
||||||
|
|
||||||
ignore_missing_imports = True
|
|
||||||
namespace_packages = True
|
|
||||||
explicit_package_bases = True
|
|
||||||
scripts_are_modules = True
|
|
||||||
pretty = True
|
|
||||||
show_error_context = True
|
|
||||||
follow_imports_for_stubs = True
|
|
||||||
warn_redundant_casts = True
|
|
||||||
warn_unused_ignores = True
|
|
||||||
# subset of mypy --strict
|
|
||||||
# https://mypy.readthedocs.io/en/stable/config_file.html
|
|
||||||
check_untyped_defs = True
|
|
||||||
disallow_incomplete_defs = True
|
|
||||||
warn_return_any = True
|
|
||||||
strict_equality = True
|
|
||||||
disallow_untyped_defs = True
|
|
||||||
exclude = src/cloudevents/v1
|
|
|
@ -117,3 +117,26 @@ extend-ignore = ["E203"]
|
||||||
testpaths = [
|
testpaths = [
|
||||||
"tests",
|
"tests",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
python_version = 3.9
|
||||||
|
|
||||||
|
ignore_missing_imports = true
|
||||||
|
namespace_packages = true
|
||||||
|
explicit_package_bases = true
|
||||||
|
scripts_are_modules = true
|
||||||
|
pretty = true
|
||||||
|
show_error_context = true
|
||||||
|
follow_imports_for_stubs = true
|
||||||
|
warn_redundant_casts = true
|
||||||
|
warn_unused_ignores = true
|
||||||
|
# subset of mypy --strict
|
||||||
|
# https://mypy.readthedocs.io/en/stable/config_file.html
|
||||||
|
check_untyped_defs = true
|
||||||
|
disallow_incomplete_defs = true
|
||||||
|
warn_return_any = true
|
||||||
|
strict_equality = true
|
||||||
|
disallow_untyped_defs = true
|
||||||
|
exclude = [
|
||||||
|
"src/cloudevents/v1"
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue