diff --git a/pyproject.toml b/pyproject.toml index 7b05d2af70..4e8fefc884 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -212,3 +212,44 @@ addopts = "-r aR" testpaths = [ "tests/", ] + +[tool.codespell] +ignore-words-list = "ba,overriden,te" + +[tool.coverage.run] +branch = true +source = ["pdm/"] +omit = [ + "pdm/__main__.py", + "pdm/pep582/sitecustomize.py", + "pdm/models/in_process/*.py", + "pdm/models/setup.py", + "*/pdm-test-*-env/*", +] + +[tool.coverage.report] +# Regexes for lines to exclude from consideration +exclude_lines = [ + "pragma: no cover", + # Don't complain about missing debug-only code: + "def __repr__", + "if self.debug", + # Don't complain if tests don't hit defensive assertion code: + "raise AssertionError", + "raise NotImplementedError", + # Don't complain if non-runnable code isn't run: + "if __name__ == .__main__.:", + "if TYPE_CHECKING:", +] +ignore_errors = true + +[tool.mypy] +follow_imports = "silent" +ignore_missing_imports = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +disallow_untyped_decorators = true +exclude = "pdm/(pep582/|models/in_process/.+\\.py)" +namespace_packages = true +mypy_path = "src" +explicit_package_bases = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index f70ca2c3f8..0000000000 --- a/setup.cfg +++ /dev/null @@ -1,38 +0,0 @@ -[codespell] -ignore-words-list = ba,overriden,te - -[coverage:run] -branch = true -source = pdm/ -omit = - pdm/__main__.py - pdm/pep582/sitecustomize.py - pdm/models/in_process/*.py - pdm/models/setup.py - */pdm-test-*-env/* - -[coverage:report] -# Regexes for lines to exclude from consideration -exclude_lines = - pragma: no cover - # Don't complain about missing debug-only code: - def __repr__ - if self.debug - # Don't complain if tests don't hit defensive assertion code: - raise AssertionError - raise NotImplementedError - # Don't complain if non-runnable code isn't run: - if __name__ == .__main__.: - if TYPE_CHECKING: -ignore_errors = true - -[mypy] -follow_imports = silent -ignore_missing_imports = True -disallow_incomplete_defs = True -disallow_untyped_defs = True -disallow_untyped_decorators = True -exclude = pdm/(pep582/|models/in_process/.+\.py) -namespace_packages = True -mypy_path = src -explicit_package_bases = True