X Tutup
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
additional_dependencies: [tomli]
exclude: ^test/fixtures/

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
rev: v0.15.5
hooks:
- id: ruff-check
args: ["--fix"]
Expand All @@ -16,14 +16,14 @@ repos:
exclude: ^git/ext/

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck
args: [--color]
exclude: ^test/fixtures/polyglot$|^git/ext/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

pre-commit-hooks v6.0.0 requires Python >= 3.9. This repo still supports Python 3.7/3.8 (see python_requires / tox env list), and tox -e misc runs pre-commit, so contributors (or CI jobs) invoking pre-commit under 3.7/3.8 will fail to create the hook environment. Consider either pinning pre-commit-hooks to <6, or explicitly ensuring pre-commit runs with Python >= 3.9 (e.g., run the misc tox env only on >=3.9 and/or set a default_language_version for python hooks).

Suggested change
rev: v6.0.0
rev: v5.0.0

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

I think it was okay for this to be non-blocking, but it makes a reasonable point--although it's been a long time since our pre-commit hooks all worked on the lowest version of Python that GitPython supports, it may make sense to do something to make this clear.

I think Copilot is correct that we can use default_language_version to make the hooks run with a different version. This feels like it would be even better, but I'm not sure. I think it would be confusing to have that happen when running it from inside a virtual environment for an earlier version, and still not work if no such interpreter is available. Therefore I suspect just a comment, or even just a clear note in the readme, would be better. But I haven't looked into it.

hooks:
- id: end-of-file-fixer
exclude: ^test/fixtures/|COPYING|LICENSE
Expand All @@ -33,6 +33,6 @@ repos:
- id: check-merge-conflict

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
rev: v0.25
hooks:
- id: validate-pyproject
Loading
X Tutup