Skip to content

Commit ab6bfe5

Browse files
committed
chore: delete setup.cfg, move tool configurations under it to pyproject.toml
close #2703
1 parent 9746780 commit ab6bfe5

File tree

3 files changed

+42
-39
lines changed

3 files changed

+42
-39
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- repo: https://github.com/codespell-project/codespell
1919
rev: v2.2.6
2020
hooks:
21-
- id: codespell # See setup.cfg for args
21+
- id: codespell # See pyproject.toml for args
2222

2323
- repo: https://github.com/pre-commit/mirrors-mypy
2424
rev: v1.9.0

pyproject.toml

+41
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,44 @@ addopts = "-r aR"
212212
testpaths = [
213213
"tests/",
214214
]
215+
216+
[tool.codespell]
217+
ignore-words-list = "ba,overriden,te"
218+
219+
[tool.coverage.run]
220+
branch = true
221+
source = ["pdm/"]
222+
omit = [
223+
"pdm/__main__.py",
224+
"pdm/pep582/sitecustomize.py",
225+
"pdm/models/in_process/*.py",
226+
"pdm/models/setup.py",
227+
"*/pdm-test-*-env/*",
228+
]
229+
230+
[tool.coverage.report]
231+
# Regexes for lines to exclude from consideration
232+
exclude_lines = [
233+
"pragma: no cover",
234+
# Don't complain about missing debug-only code:
235+
"def __repr__",
236+
"if self.debug",
237+
# Don't complain if tests don't hit defensive assertion code:
238+
"raise AssertionError",
239+
"raise NotImplementedError",
240+
# Don't complain if non-runnable code isn't run:
241+
"if __name__ == .__main__.:",
242+
"if TYPE_CHECKING:",
243+
]
244+
ignore_errors = true
245+
246+
[tool.mypy]
247+
follow_imports = "silent"
248+
ignore_missing_imports = true
249+
disallow_incomplete_defs = true
250+
disallow_untyped_defs = true
251+
disallow_untyped_decorators = true
252+
exclude = "pdm/(pep582/|models/in_process/.+\\.py)"
253+
namespace_packages = true
254+
mypy_path = "src"
255+
explicit_package_bases = true

setup.cfg

-38
This file was deleted.

0 commit comments

Comments
 (0)