.pre-commit-config.yaml 1.14 KB
Newer Older
1
# If you change the versions below, please make sure they are in-sync
2
# with requirements-dev.txt
3

Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
4
5
6
7
8
9
10
exclude: 'build|stubs'

default_language_version:
    python: python3

repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
11
    rev: v4.0.1
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
12
13
14
15
16
17
18
19
20
    hooks:
    -   id: trailing-whitespace
    -   id: check-ast
    -   id: check-merge-conflict
    -   id: check-added-large-files
        args: ['--maxkb=500']
    -   id: end-of-file-fixer

-   repo: https://github.com/ambv/black
21
    rev: 21.10b0
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
22
23
24
25
    hooks:
    - id: black

-   repo: https://gitlab.com/pycqa/flake8
26
    rev: 4.0.1
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
27
28
    hooks:
    -   id: flake8
29
        args: [--show-source, --statistics]
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
30
31

-   repo: https://github.com/asottile/seed-isort-config
32
    rev: v2.2.0
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
33
34
35
    hooks:
    -   id: seed-isort-config

36
-   repo: https://github.com/pycqa/isort
37
    rev: 5.10.1
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
38
39
    hooks:
    -   id: isort
Tom Birch's avatar
Tom Birch committed
40
        exclude: README.md
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
41
42
43
        additional_dependencies: [toml]

-   repo: https://github.com/pre-commit/mirrors-mypy
44
    rev: 'v0.910'
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
45
46
    hooks:
    -   id: mypy
47
        args: [--no-strict-optional, --ignore-missing-imports, --scripts-are-modules, --pretty]
48
        additional_dependencies: [numpy]