I installed the new pre-commit hooks and keep runn...
# contribute
j
I installed the new pre-commit hooks and keep running into a weird ruff error. I'm not familiar with ruff, any ideas?
Copy code
ruff.....................................................................Failed
- hook id: ruff
- exit code: 2

error: TOML parse error at line 176, column 1
    |
176 | [tool.ruff.format]
    | ^^^^^^^^^^^^^^^^^^
wanted exactly 1 element, more than 1 element

black....................................................................Passed
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
fix requirements.txt.................................(no files to check)Skipped
check python ast.........................................................Passed
s
what version of ruff, python?
did you make any modifications to the pyproject.toml ?
j
ruff==0.6.1
Python 3.10.14
I didn't touch the toml file, only did
pre-commit install
and tried to commit to something
s
hmm the .pre-commit-config.yaml specifies
v0.5.7
for ruff
can you downgrade to that and try
pre-commit run --all-files
?
j
Somehow, my .pre-commit-config.yaml got messed up, but restoring that fixed it! Btw, pyproject.toml doesn't pin a ruff version so the latest gets installed. Not sure how urgent the change is, I can pin it in my PR
s
Yeah the version is in the pre-commit-config.yaml