chore: drop redundant pyupgrade by Ruff UP, extend ruff config, drop setup.py#331
Merged
Conversation
- Remove stub setup.py — all metadata in pyproject.toml; bump setuptools>=40→>=61 for src-layout auto-discovery - Add ruff target-version="py310" (matches requires-python) and format.preview=true (matches pre-commit --preview) - Update pre-commit: ruff→ruff-check with --fix, drop pyupgrade (UP ruleset in ruff covers it) - Drop MANIFEST.in `include *.py` — no .py files at root after setup.py removal --- Co-authored-by: Claude Code <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR modernizes the project’s packaging and linting configuration by fully leaning on pyproject.toml (PEP 517/518) and updating Ruff + pre-commit integration.
Changes:
- Remove legacy
setup.pyand raise the build-time setuptools minimum. - Update Ruff configuration (target version + preview formatting) in
pyproject.toml. - Adjust pre-commit hooks (Ruff hook change; remove
pyupgrade) and tighten the sdist manifest.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| setup.py | Removes legacy setuptools entrypoint in favor of pyproject.toml builds. |
| pyproject.toml | Raises setuptools floor and updates Ruff configuration (py310 + preview formatting). |
| MANIFEST.in | Stops including top-level *.py in the source distribution. |
| .pre-commit-config.yaml | Switches Ruff hook configuration and removes the pyupgrade hook. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 pull request updates the project's configuration and setup files to modernize tooling and streamline the build process. The most important changes include updating dependencies for better compatibility, refining pre-commit hooks, and cleaning up obsolete files and configuration.
Build system and dependency updates:
setuptoolsinpyproject.tomlfrom 40 to 61 to ensure compatibility with newer Python packaging standards.target-versionfor Ruff to Python 3.10 and enabledformat.previewinpyproject.tomlto align linting and formatting with current Python versions.Pre-commit configuration improvements:
ruffhook withruff-checkand enabled auto-fixing in.pre-commit-config.yamlfor better code quality enforcement.pyupgradepre-commit hook, as it is no longer needed, reducing unnecessary checks.Project cleanup:
setup.pyfile, as the project now relies onpyproject.tomlfor builds, following modern Python packaging practices..pyfiles in the source distribution by removing the relevant line fromMANIFEST.in, likely to avoid packaging unnecessary files.include *.py— no .py files at root after setup.py removal