-
Notifications
You must be signed in to change notification settings - Fork 18
fix(build): pin pre-commit's Python to .python-version #502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yudataguy
wants to merge
1
commit into
main
Choose a base branch
from
fix/pre-commit-python-pin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 226
🏁 Script executed:
Repository: Open-Source-Space-Foundation/proves-core-reference
Length of output: 2592
🌐 Web query:
GNU Make conditional assignment ?= environment variable command line override variable documentation💡 Result:
In GNU Make, the
?=operator is a conditional variable assignment operator that assigns a value to a variable only if that variable is not yet defined [1][2]. Behavior and Precedence The?=operator is functionally equivalent to [1]: ifeq ($(origin VARIABLE), undefined) VARIABLE = value endif Because it only acts when a variable is undefined, its behavior regarding environment variables and command-line arguments is dictated by the variable's state upon reaching the assignment [1][3]: 1. Command-Line Arguments: If you provide a variable assignment on the command line (e.g., make VAR=foo), that variable is considered defined before the makefile is parsed [3][4]. Consequently, anyVAR ?= barassignment in the makefile will be ignored, and the command-line value will persist [2][3]. 2. Environment Variables: By default, GNU Make imports environment variables as defined variables [5][6]. If a variable exists in the environment,VAR ?= barwill see that the variable is already defined and will not perform the assignment [3]. 3. Override Directive: If you must force a value in the makefile even when a command-line argument or environment variable is present, you can use theoverridedirective (e.g., override VAR?= bar) [7][4]. Key Considerations * Defined vs. Empty: A variable set to an empty value (e.g., VAR=) is still considered defined [1][2]. In this case,VAR ?= barwill not assign "bar" because the variable is already defined, even though it is empty [1][2]. * Environment Overrides (-e): If you run make with the -e (--environment-overrides) flag, environment variables take precedence over ordinary assignments in the makefile [5][6]. However, even with -e, command-line arguments typically retain higher priority [3]. For most use cases,?=is the standard way to provide default values that users can easily override via the command line or environment [2].Citations:
Keep
.python-versionauthoritative for tooling.PYTHON_VERSION ?=andUVX_PINNED ?=let command-line or environment values bypass the intended pin. Set these with non-overridable assignments if.python-versionmust control pre-commit tooling; otherwise document that overrides intentionally bypass it.🤖 Prompt for AI Agents