Files
mostovik-backend/.pre-commit-config.yaml
Aleksandr Meshchriakov f121445313 feat(core): add core module with mixins, services, and background jobs
- Add Model Mixins: TimestampMixin, SoftDeleteMixin, AuditMixin, etc.
- Add Base Services: BaseService, BulkOperationsMixin, QueryOptimizerMixin
- Add Base ViewSets with bulk operations
- Add BackgroundJob model for Celery task tracking
- Add BaseAppCommand for management commands
- Add permissions, pagination, filters, cache, logging
- Migrate tests to factory_boy + faker
- Add CHANGELOG.md
- 297 tests passing
2026-01-21 11:47:26 +01:00

57 lines
1.4 KiB
YAML

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
name: ruff lint (src only)
files: ^src/.*\.py$
args: [--fix, --exit-non-zero-on-fix]
exclude: |
(?x)^(
src/.*/migrations/.*|
src/.*/__pycache__/.*
)$
- id: ruff-format
name: ruff format (src only)
files: ^src/.*\.py$
args: []
exclude: |
(?x)^(
src/.*/migrations/.*|
src/.*/__pycache__/.*
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
name: check trailing whitespace (src only)
files: ^src/.*\.(py|txt|md|yaml|yml)$
- id: end-of-file-fixer
name: fix end of file (src only)
files: ^src/.*\.(py|txt|md|yaml|yml)$
- id: check-yaml
name: check yaml syntax (src only)
files: ^src/.*\.ya?ml$
- id: check-added-large-files
name: check large files
args: ["--maxkb=500"]
- repo: local
hooks:
- id: django-check-migrations
name: django check migrations
entry: ./scripts/check-migrations.sh
language: script
files: ^src/.*\.py$
pass_filenames: false
exclude: |
(?x)^(
src/.*/migrations/.*|
src/.*/__pycache__/.*
)$