mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-10-14 08:53:44 +02:00
Add separate pre-commit
config for hatch
Authored by: bashonly
This commit is contained in:
parent
2ffa8ed373
commit
10f4b229de
@ -1,8 +1,13 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: fix
|
- id: linter
|
||||||
name: Apply code fixes
|
name: Apply linter fixes
|
||||||
entry: hatch fmt
|
entry: ruff check --fix .
|
||||||
|
language: system
|
||||||
|
types: [python]
|
||||||
|
- id: format
|
||||||
|
name: Apply formatting fixes
|
||||||
|
entry: autopep8 --in-place .
|
||||||
language: system
|
language: system
|
||||||
types: [python]
|
types: [python]
|
||||||
|
8
.pre-commit-hatch.yaml
Normal file
8
.pre-commit-hatch.yaml
Normal file
@ -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"
|
path = ".venv"
|
||||||
|
|
||||||
[tool.hatch.envs.default.scripts]
|
[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}"
|
yt-dlp = "python -Werror -Xdev -m yt_dlp {args}"
|
||||||
|
|
||||||
[tool.hatch.envs.hatch-static-analysis]
|
[tool.hatch.envs.hatch-static-analysis]
|
||||||
|
Loading…
Reference in New Issue
Block a user