Skip to content

chore: overrided pinned python version in ansible-lint pre-commit hook - #99

Merged
sabre1041 merged 2 commits into
redhat-cop:mainfrom
burigolucas:main
Sep 27, 2026
Merged

sabre1041 merged 2 commits into
redhat-cop:mainfrom
burigolucas:main

Conversation

@burigolucas

Copy link
Copy Markdown
Contributor

Description

The ansible-lint hook in the upstream v25.12.2 release hardcodes language_version: python3.13
in its own .pre-commit-hooks.yaml. This causes pre-commit to always create a Python 3.13
isolated environment for the hook, regardless of the Python version available on the system.

This change overrides the upstream language_version by setting language_version: python3 in
our local hook configuration, which instructs pre-commit to use whatever python3 resolves to on
each contributor's machine instead of requiring Python 3.13 specifically.

Type of Change

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation changes
  • style: Formatting, missing semi colons, etc; no code change
  • refactor: Refactoring production code
  • test: Adding missing tests, refactoring tests; no production code change
  • chore: Updating configs, etc; no production code change

Pull Request Title

Note: Please ensure your PR title follows Conventional Commits.
Example: feat: add role

  • I have formatted my PR title correctly.

CI Checks

Tier 1 checks (ansible-lint, pre-commit, PR title, gitleaks) run automatically on all PRs.
Full CI (Tier 2) requires maintainer approval for PRs from forks.
To run full CI before opening this PR, configure AUTOMATION_HUB_TOKEN in your fork's secrets — see Running Full CI in Your Fork.

@sabre1041 sabre1041 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sabre1041
sabre1041 merged commit 92e7215 into redhat-cop:main Sep 27, 2026
22 checks passed

This branch was successfully deployed

1 active deployment
external-ci — cc869d2a Deployed Sep 23, 2026 by burigolucas via external-approval #666
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.

Precommit hook expects Python 3.13 but setup_env.sh does not specify Python version to use

2 participants