-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy path.pre-commit-config.yaml
52 lines (48 loc) · 1.52 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
files: '.*\.py$'
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
args:
- '--fix=lf'
- id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://github.com/adamchainz/django-upgrade
rev: '1.22.2'
hooks:
- id: django-upgrade
args: [--target-version, '4.2', '--skip', 'admin_register']
files: '^docker-app/qfieldcloud/.*.py$'
# Lint and format
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.1
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
# Static type-checking with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [types-pytz, types-Deprecated, types-PyYAML, types-requests, types-tabulate, types-jsonschema, django-stubs, django-stubs-ext, djangorestframework-stubs]
pass_filenames: false
entry: bash -c 'mypy -p docker-app -p docker-qgis "$@"' --