summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
blob: 19ce43cb8a04a1429c43fd04fe136a6b2cfed1f8 (plain)
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
exclude: ^(.bzr|\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.pants\.d|\.svn|\.tox|\.venv|_build|buck-out|build|dist|node_modules|venv|\.idea|dockerdata|static|.*\b(migrations)\b.*)
repos:
-   repo: https://github.com/pycqa/isort
    rev: 5.12.0
    hooks:
    - id: isort
-   repo: https://github.com/ambv/black
    rev: 22.3.0
    hooks:
    - id: black
      language_version: python3
-   repo: https://github.com/pycqa/flake8
    rev: 6.1.0
    hooks:
    - id: flake8
      additional_dependencies:
        - flake8-bugbear==23.9.16
        - flake8-builtins==2.1.0
        - flake8-comprehensions==3.14.0
        - flake8-tidy-imports==4.10.0
        - flake8-eradicate==1.5.0
        - flake8-print==5.0.0
        - flake8-return==1.2.0
        - flake8-use-fstring==1.4
- repo: local
  hooks:
    - id: pylint
      name: pylint
      entry: pylint
      language: system
      types: [python]
      args:
        [
          "-rn", # Only display messages
          "-sn", # Don't display the score
          "--rcfile=pylintrc", # Link to your config file
          "--load-plugins=pylint_django",
          "--django-settings-module=app.settings"
        ]
- repo: https://github.com/pre-commit/mirrors-mypy
  rev: v1.6.1
  hooks:
    - id: mypy
      args: [--strict]
      additional_dependencies:
        - django-stubs==4.2.5
        - django-environ==0.11.2
        - django_extensions==3.2.3