mirror of
https://github.com/FuzzyGrim/Yamtrack.git
synced 2026-03-02 22:57:00 +00:00
add pre-commit
This commit is contained in:
15
.pre-commit-config.yaml
Normal file
15
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff
|
||||
entry: ruff check --fix
|
||||
language: system
|
||||
types: [python]
|
||||
require_serial: true
|
||||
- id: ruff-format
|
||||
name: ruff-format
|
||||
entry: ruff format
|
||||
language: system
|
||||
types: [python]
|
||||
require_serial: true
|
||||
@@ -118,6 +118,7 @@ Then run the following commands.
|
||||
|
||||
```bash
|
||||
python -m pip install -U -r requirements-dev.txt
|
||||
pre-commit install
|
||||
cd src
|
||||
python manage.py migrate
|
||||
python manage.py runserver & celery -A config worker --beat --scheduler django --loglevel DEBUG & tailwindcss -i ./static/css/input.css -o ./static/css/tailwind.css --watch
|
||||
|
||||
@@ -4,7 +4,7 @@ extend-exclude = ["migrations"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["ALL"]
|
||||
ignore = ["ANN", "PT", "PD", "D100", "D104", "RUF012", "PLR0913", "SLF001"]
|
||||
ignore = ["ANN", "PT", "PD", "D100", "D104", "RUF012", "PLR0913", "SLF001", "COM812"]
|
||||
|
||||
[tool.ruff.lint.pycodestyle]
|
||||
max-doc-length = 88
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
coverage==7.13.0
|
||||
djlint==1.36.4
|
||||
fakeredis==2.33.0
|
||||
pre-commit==4.5.1
|
||||
pytest-django==4.11.1
|
||||
pytest-playwright==0.7.2
|
||||
ruff==0.14.10
|
||||
|
||||
Reference in New Issue
Block a user