Address review

This commit is contained in:
Simon Sawicki 2024-03-15 22:28:47 +01:00
parent 95d8d11698
commit e0b46bb8ac
No known key found for this signature in database
3 changed files with 7 additions and 2 deletions

View file

@ -2,7 +2,7 @@ repos:
- repo: local
hooks:
- id: check
name: code check
name: code check (run hatch run fix if it fails)
entry: hatch run check
language: system
types: [python]

View file

@ -145,7 +145,7 @@ # DEVELOPER INSTRUCTIONS
$ hatch run install
```
before creating commits so that the pre-commit hooks are properly initialized.
so that required checks run automatically before a commit (using pre-commit).
After this you can use `hatch shell` to enable a virtual environment that has development dependencies as well as `yt-dlp` installed.
Scripts can be used to run simple tasks, like linting or testing, without having to run `hatch shell` first:

View file

@ -121,9 +121,14 @@ pattern = "_pkg_version = '(?P<version>[^']+)'"
[tool.hatch.envs.default]
features = ["dev"]
path = ".venv"
[tool.hatch.envs.default.scripts]
install = "pre-commit install"
fix = [
"format",
"lint",
]
lint = "ruff check --fix {args:.}"
format = "autopep8 --in-place {args:.}"
check = [