Skip to content

chore: drop redundant pyupgrade by Ruff UP, extend ruff config, drop setup.py#331

Merged
icemac merged 2 commits into
pytest-dev:masterfrom
Borda:ruff/up
Jun 3, 2026
Merged

chore: drop redundant pyupgrade by Ruff UP, extend ruff config, drop setup.py#331
icemac merged 2 commits into
pytest-dev:masterfrom
Borda:ruff/up

Conversation

@Borda

@Borda Borda commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

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:

  • Updated the minimum required version of setuptools in pyproject.toml from 40 to 61 to ensure compatibility with newer Python packaging standards.
  • Set the target-version for Ruff to Python 3.10 and enabled format.preview in pyproject.toml to align linting and formatting with current Python versions.

Pre-commit configuration improvements:

  • Replaced the ruff hook with ruff-check and enabled auto-fixing in .pre-commit-config.yaml for better code quality enforcement.
  • Removed the pyupgrade pre-commit hook, as it is no longer needed, reducing unnecessary checks.

Project cleanup:

  • Removed the setup.py file, as the project now relies on pyproject.toml for builds, following modern Python packaging practices.
  • Stopped including all .py files in the source distribution by removing the relevant line from MANIFEST.in, likely to avoid packaging unnecessary files.

  • 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

- 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>
Copilot AI review requested due to automatic review settings June 3, 2026 04:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py and 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.

Comment thread pyproject.toml
Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
Comment thread pyproject.toml

@icemac icemac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@icemac icemac merged commit 89aeccc into pytest-dev:master Jun 3, 2026
42 checks passed
@Borda Borda deleted the ruff/up branch June 3, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants