Skip to content

By default override the project.requires-python#123

Merged
sbrunner merged 1 commit intomasterfrom
keep-requires-python
Nov 7, 2025
Merged

By default override the project.requires-python#123
sbrunner merged 1 commit intomasterfrom
keep-requires-python

Conversation

@sbrunner
Copy link
Copy Markdown
Owner

@sbrunner sbrunner commented Nov 7, 2025

Add option keep-requires-python to keep it

@sbrunner sbrunner requested a review from Copilot November 7, 2025 12:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds a new configuration option keep-requires-python to control whether the hook updates the requires-python field, and refactors duplicate code by extracting a new _get_python_specifiers_version() function.

Key Changes:

  • Introduced keep-requires-python configuration option in [tool.python-versions-hook] (defaults to false)
  • Extracted _get_python_specifiers_version() function to eliminate code duplication
  • Added documentation for the new configuration option in README.md

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
python_versions_hook/init.py Added _get_python_specifiers_version() function and integrated keep-requires-python config option to control requires-python field updates
README.md Documented the new keep-requires-python configuration option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sbrunner sbrunner force-pushed the keep-requires-python branch from 6baeb8b to dfe64c3 Compare November 7, 2025 13:03
@sbrunner sbrunner marked this pull request as ready for review November 7, 2025 13:03
@sbrunner sbrunner merged commit 3e9799a into master Nov 7, 2025
10 checks passed
@sbrunner sbrunner deleted the keep-requires-python branch November 7, 2025 13:21
@geo-ghci-int geo-ghci-int bot modified the milestone: 1.2.0 Nov 7, 2025
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.

2 participants