feat: check for deprecated setup.cfg settings#572
Merged
Conversation
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new check (SCFG001) to detect deprecated dash usage in setup.cfg option names, ensuring consistency with the updated setuptools requirements. Key changes include:
- Adding tests in tests/test_setupcfg.py for valid and invalid setup.cfg files.
- Introducing a new family ("setupcfg") and check (SCFG001) in the checks module.
- Updating pyproject.toml, documentation, and README to incorporate the new check.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_setupcfg.py | Adds tests for validating setup.cfg configuration. |
| src/sp_repo_review/families.py | Registers a new family for setuptools configuration. |
| src/sp_repo_review/checks/setupcfg.py | Introduces SCFG001 to check for deprecated options. |
| pyproject.toml | Updates entry points to include setup.cfg checks. |
| docs/pages/guides/packaging_simple.md | Updates documentation to reference modern and legacy usage. |
| docs/pages/guides/packaging_classic.md | Updates legacy packaging guide with appropriate notes. |
| README.md | Adds information on the new SCFG001 check. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was rolled back in setuptools 78.0.2, but is targeting 2026. Let's check for it.
See pypa/setuptools#4911 and related PRs/issues.