.pre-commit-config.yaml 1.2 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
    hooks:
    -   id: trailing-whitespace
    -   id: check-ast
    -   id: check-merge-conflict
    -   id: no-commit-to-branch
17
        args: ['--branch=main']
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
18
19
20
21
22
    -   id: check-added-large-files
        args: ['--maxkb=500']
    -   id: end-of-file-fixer

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

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

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

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

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