Files
peft/.pre-commit-config.yaml
Benjamin Bossan eb1a25abfb CHORE: Upgrade ruff to ~0.12.8 (#2734)
Subjectively, there have been more issues recently with contributor PRs
being rejected by ruff. This could possibly be caused by them using a
different ruff version (presumably: more recent). This PR upgrades ruff
to the latest version to hopefully reduce these issues.

The only change needed to make this ruff version pass was to disable
UP045. This rule requires changing code like:

x: Optional[int]

into

x: int | None

in 220 places. Personally, I don't think it's crucial. Moreover, ruff
won't fix this automically, except with --unsafe-fixes (note that Python
3.9 needs a __future__ import for this, so that could be the reason). My
preference is thus just to disable the rule, but LMK if you disagree.
2025-08-14 18:03:38 +02:00

14 lines
303 B
YAML

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.8
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-yaml