This commit is contained in:
Fundor333
2026-03-30 22:27:44 +02:00
parent 60321ae751
commit bc0c7c9237
2 changed files with 15 additions and 12 deletions

View File

@@ -1,19 +1,19 @@
fail_fast: true fail_fast: true
repos: repos:
- repo: https://github.com/adamchainz/djade-pre-commit - repo: https://github.com/adamchainz/djade-pre-commit
rev: "1.4.0" # Replace with the latest tag on GitHub rev: "1.9.0" # Replace with the latest tag on GitHub
hooks: hooks:
- id: djade - id: djade
args: [--target-version, "4.2"] # Replace with Django version args: [--target-version, "4.2"] # Replace with Django version
- repo: https://github.com/asottile/reorder_python_imports - repo: https://github.com/asottile/reorder_python_imports
rev: v3.15.0 rev: v3.16.0
hooks: hooks:
- id: reorder-python-imports - id: reorder-python-imports
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 25.1.0 rev: 26.3.1
hooks: hooks:
- id: black - id: black
language_version: python3.9 language_version: python3.12
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0 rev: v6.0.0
hooks: hooks:
@@ -34,7 +34,7 @@ repos:
- id: python-no-log-warn - id: python-no-log-warn
- id: python-use-type-annotations - id: python-use-type-annotations
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.20.0 rev: v3.21.2
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: [ --py311-plus ] args: [ --py311-plus ]

View File

@@ -1,5 +1,8 @@
SHELL := /bin/bash SHELL := /bin/bash
RUNNER := uv run --env-file=.env
PY := python manage.py
.PHONY: help .PHONY: help
help: ## Show this help help: ## Show this help
@@ -9,22 +12,22 @@ help: ## Show this help
.PHONY: install .PHONY: install
install: ## Make venv and install requirements install: ## Make venv and install requirements
@uv sync @uv sync
@uv run --env-file=.env pre-commit install @$(RUNNER) pre-commit install
@pre-commit autoupdate @pre-commit autoupdate
migrate: ## Make and run migrations migrate: ## Make and run migrations
@uv run --env-file=.env python manage.py makemigrations @$(RUNNER) $(PY) makemigrations
@uv run --env-file=.env python manage.py migrate @$(RUNNER) $(PY) migrate
@uv run --env-file=.env python manage.py collectstatic --noinput @$(RUNNER) $(PY) collectstatic --noinput
.PHONY: test .PHONY: test
test: ## Run tests test: ## Run tests
@uv run --env-file=.env skjold -v audit uv.lock @$(RUNNER) skjold -v audit uv.lock
@uv run --env-file=.env python manage.py test --verbosity=0 --parallel --failfast @$(RUNNER) $(PY) test --verbosity=0 --parallel --failfast
.PHONY: run .PHONY: run
run: ## Run the Django server run: ## Run the Django server
@uv run --env-file=.env python manage.py runserver @$(RUNNER) $(PY) runserver
start: install migrate run ## Install requirements, apply migrations, then start development server start: install migrate run ## Install requirements, apply migrations, then start development server