79 lines
1.8 KiB
YAML
79 lines
1.8 KiB
YAML
exclude: ".venv|__pycache__|tests/dev/|tests/fixtures/"
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: check-added-large-files
|
|
args:
|
|
- --maxkb=500
|
|
- id: check-case-conflict
|
|
- id: check-illegal-windows-names
|
|
- id: check-toml
|
|
- id: check-xml
|
|
- id: check-yaml
|
|
- id: detect-private-key
|
|
- id: end-of-file-fixer
|
|
- id: fix-byte-order-marker
|
|
- id: trailing-whitespace
|
|
args:
|
|
- --markdown-linebreak-ext=md
|
|
|
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
rev: "v0.13.3"
|
|
hooks:
|
|
- id: ruff
|
|
args:
|
|
- --fix
|
|
- --target-version=py39
|
|
types_or:
|
|
- python
|
|
- pyi
|
|
- id: ruff-format
|
|
args:
|
|
- --line-length=88
|
|
- --target-version=py39
|
|
types_or:
|
|
- python
|
|
- pyi
|
|
|
|
# take care, it could conflicts with ruff-format
|
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
rev: 25.9.0
|
|
hooks:
|
|
- id: black
|
|
args:
|
|
- --target-version=py39
|
|
|
|
# Disabled until PyQt translation support f-strings
|
|
# - repo: https://github.com/asottile/pyupgrade
|
|
# rev: v3.15.0
|
|
# hooks:
|
|
# - id: pyupgrade
|
|
# args:
|
|
# - "--py39-plus"
|
|
|
|
- repo: https://github.com/pycqa/isort
|
|
rev: 6.1.0
|
|
hooks:
|
|
- id: isort
|
|
args:
|
|
- --profile
|
|
- black
|
|
- --filter-files
|
|
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: 7.3.0
|
|
hooks:
|
|
- id: flake8
|
|
files: ^gn_tools/.*\.py$
|
|
additional_dependencies:
|
|
- flake8-qgis
|
|
args:
|
|
[
|
|
"--config=setup.cfg",
|
|
"--select=E9,F63,F7,F82,QGS101,QGS102,QGS103,QGS104,QGS106",
|
|
]
|
|
|
|
|