By default override the project.requires-python#123
Merged
Conversation
There was a problem hiding this comment.
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-pythonconfiguration option in[tool.python-versions-hook](defaults tofalse) - 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.
6baeb8b to
dfe64c3
Compare
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.
Add option
keep-requires-pythonto keep it