Add separate `pre-commit` config for `hatch`

Authored by: bashonly
pull/7409/head
bashonly 4 weeks ago
parent 2ffa8ed373
commit 10f4b229de
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

@ -1,8 +1,13 @@
repos:
- repo: local
hooks:
- id: fix
name: Apply code fixes
entry: hatch fmt
- id: linter
name: Apply linter fixes
entry: ruff check --fix .
language: system
types: [python]
- id: format
name: Apply formatting fixes
entry: autopep8 --in-place .
language: system
types: [python]

@ -0,0 +1,8 @@
repos:
- repo: local
hooks:
- id: fix
name: Apply code fixes
entry: hatch fmt
language: system
types: [python]

@ -136,7 +136,7 @@ dependencies = ["pre-commit"]
path = ".venv"
[tool.hatch.envs.default.scripts]
setup = "pre-commit install"
setup = "pre-commit install --config .pre-commit-hatch.yaml"
yt-dlp = "python -Werror -Xdev -m yt_dlp {args}"
[tool.hatch.envs.hatch-static-analysis]

Loading…
Cancel
Save