forked from leibowitz/django-azure-ad-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
116 lines (102 loc) · 2.85 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
default_language_version:
python: python3.10
exclude: 'docs|^.git$|.devcontainer|.vscode|gunicorn.conf.py'
default_stages: [commit]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: forbid-submodules
- id: trailing-whitespace
args:
- "--markdown-linebreak-ext=md"
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
hooks:
- id: check-github-workflows
- id: check-dependabot
# allows json to have comments as opposed to pre-commit-hooks:check-json
- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
hooks:
- id: check-json5
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.0.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.277
hooks:
- id: ruff
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/python-poetry/poetry
rev: 1.5.1
hooks:
- id: poetry-check
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.14.0
hooks:
- id: django-upgrade
args: [--target-version, "3.2"] # eventually, 4.2...
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
hooks:
- id: pyupgrade
args: [--py310-plus]
# Temporarily disabled - consider pyright as well
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.4.1
# hooks:
# - id: mypy
# # This list probably needs expansion...
# additional_dependencies:
# - 'numpy'
# - 'pydantic'
# - 'types-PyYAML'
# - 'types-python-dateutil'
# - 'types-pytz'
# - 'types-requests'
# - 'types-setuptools'
# - 'types-toml'
# - 'django-stubs'
# This is not very correct - hppefully it improves. Also see:
# https://github.com/devinsmith911/docker-compose-verifier/tree/master/.githooks
# - repo: https://github.com/iamthefij/docker-pre-commit
# rev: v3.0.1
# hooks:
# - id: docker-compose-check
# TODO:
# Bandit
# - repo: https://github.com/PyCQA/bandit
# rev: 1.7.5
# hooks:
# - id: bandit
# Commitizen
# - repo: https://github.com/commitizen-tools/commitizen
# rev: 3.5.2
# hooks:
# - id: commitizen
# - id: commitizen-branch
# stages: [push]