diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac3625b..a0e064c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,5 @@ repos: rev: v1.11.2 hooks: - id: mypy - files: ^(src/cloudevents/) + args: [ "--config-file", "pyproject.toml" ] types: [ python ] - args: [ ] diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 0fa267c..0000000 --- a/mypy.ini +++ /dev/null @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 707f2d9..c9ea7b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,3 +117,26 @@ extend-ignore = ["E203"] testpaths = [ "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" +]