Skip to content

Commit

Permalink
chore: delete setup.cfg, move tool configurations under it to pyproje…
Browse files Browse the repository at this point in the history
…ct.toml

close pdm-project#2703
  • Loading branch information
boholder committed Mar 21, 2024
1 parent 9746780 commit ab6bfe5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell # See setup.cfg for args
- id: codespell # See pyproject.toml for args

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
Expand Down
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 0 additions & 38 deletions setup.cfg

This file was deleted.

0 comments on commit ab6bfe5

Please sign in to comment.