-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Description
The demo config in the readme is formated as a list with a single item. Running it using a version of pre-commit >= 3 results in the following error:
An error has occurred: InvalidConfigError:
==> File .pre-commit-config.yaml
=====> Expected a Config map but got a list
pre-commit version 3 dropped support for the list format. The issue is described here: https://stackoverflow.com/questions/75216436/pre-commit-is-failing-with-expected-a-config-map-but-got-a-list
Running pre-commit migrate-config migrates the config to:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.5
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
which works just fine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels