mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-06-25 23:20:21 +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:
|
||||
- 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]
|
||||
|
|
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"
|
||||
|
||||
[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…
Reference in New Issue
Block a user