Files
django-stubs/.pre-commit-config.yaml
Marti Raudsepp 212ef40c3d Update Black dependency to fix CI lint (#900)
* Update Black dependency to fix CI lint

Closes #896.

Black 22.3.0 fixes incompatibility with Click 8.1.0:
https://github.com/psf/black/pull/2966

This currently causes the CI to fail, e.g. https://github.com/typeddjango/django-stubs/runs/5756075543

* Reformat with Black v22
2022-03-31 11:29:31 +03:00

54 lines
1.5 KiB
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-yaml
- id: trailing-whitespace
- id: check-executables-have-shebangs
- id: debug-statements
- id: check-merge-conflict
- id: end-of-file-fixer
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.9.3
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
- id: isort
name: isort (pyi)
types: [pyi]
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
types: [ python ]
exclude: "scripts/|django_stubs_ext/"
args: [ "--config=mypy.ini", "--cache-dir=/dev/null", "--no-incremental" ]
- id: mypy
name: mypy (django_stubs_ext)
entry: mypy
language: system
types: [ python ]
files: "django_stubs_ext/|django_stubs_ext/tests/"
args: [ "--config=mypy.ini", "--cache-dir=/dev/null", "--no-incremental", "--strict" ]