Skip to content

Use language: script for cudf-polars-ir-signatures pre-commit hook#22384

Open
vyasr wants to merge 1 commit intorapidsai:mainfrom
vyasr:fix/pre-commit-cudf-polars-ir-signatures
Open

Use language: script for cudf-polars-ir-signatures pre-commit hook#22384
vyasr wants to merge 1 commit intorapidsai:mainfrom
vyasr:fix/pre-commit-cudf-polars-ir-signatures

Conversation

@vyasr
Copy link
Copy Markdown
Contributor

@vyasr vyasr commented May 5, 2026

Description

The cudf-polars-ir-signatures pre-commit hook uses language: python but 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 python3 shebang.

With language: python, pre-commit unnecessarily creates a virtualenv for this hook. language: script is the correct setting — it runs the entry point directly as an executable, relying on the shebang for interpreter selection, with no virtualenv overhead.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

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.
@vyasr vyasr requested a review from a team as a code owner May 5, 2026 20:41
@vyasr vyasr requested a review from jameslamb May 5, 2026 20:41
@vyasr vyasr added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change cudf-polars Issues specific to cudf-polars ci labels May 5, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python May 5, 2026
@vyasr vyasr added non-breaking Non-breaking change and removed non-breaking Non-breaking change labels May 5, 2026
Copy link
Copy Markdown
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants