Use language: script for cudf-polars-ir-signatures pre-commit hook#22384
Open
vyasr wants to merge 1 commit intorapidsai:mainfrom
Open
Use language: script for cudf-polars-ir-signatures pre-commit hook#22384vyasr wants to merge 1 commit intorapidsai:mainfrom
language: script for cudf-polars-ir-signatures pre-commit hook#22384vyasr wants to merge 1 commit intorapidsai:mainfrom
Conversation
The hook is a local script (./ci/check_cudf_polars_ir.py) that only uses stdlib modules and has a shebang line. Using language: python was causing pre-commit to unnecessarily create a virtualenv. language: script is the correct setting for local executable scripts.
jameslamb
approved these changes
May 5, 2026
Member
jameslamb
left a comment
There was a problem hiding this comment.
Sure, seems fine. By definition if precommit is runnable you must have a Python interpreter around, and this seems fine if you're not picky about which one.
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.
Description
The
cudf-polars-ir-signaturespre-commit hook useslanguage: pythonbut is just a local script (./ci/check_cudf_polars_ir.py) that only depends on stdlib modules (ast,argparse,sys,typing) and has a#!/usr/bin/env python3shebang.With
language: python, pre-commit unnecessarily creates a virtualenv for this hook.language: scriptis the correct setting — it runs the entry point directly as an executable, relying on the shebang for interpreter selection, with no virtualenv overhead.Checklist