Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: delete setup.cfg, move tool configurations under it to pyproject.toml #2711

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
pdm run pip install -U setuptools
pdm info
- name: Run Tests
run: pdm run pytest -n auto --cov=pdm --cov-config=setup.cfg --cov-report=xml tests
run: pdm run pytest -n auto --cov=pdm --cov-config=pyproject.toml --cov-report=xml tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
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
1 change: 1 addition & 0 deletions news/2703.chore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete `setup.cfg`, move tool configurations under it to `pyproject.toml`
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.

Loading