forked from OpenMined/PySyft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
138 lines (138 loc) · 4.39 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-ast
exclude: ^(packages/grid/ansible/)
always_run: true
- id: trailing-whitespace
always_run: true
- id: check-docstring-first
always_run: true
exclude: ^(packages/grid/ansible/)
- id: check-json
always_run: true
- id: check-added-large-files
always_run: true
exclude: ^(notebooks/trade_demo/datasets)
- id: check-yaml
always_run: true
- id: check-merge-conflict
always_run: true
args: ["--assume-in-merge"]
- id: check-executables-have-shebangs
always_run: true
exclude: ^(packages/grid/ansible/)
- id: debug-statements
always_run: true
exclude: ^(packages/grid/ansible/)
- id: name-tests-test
always_run: true
exclude: ^(packages/grid/backend/app/app/tests/utils/)
- id: requirements-txt-fixer
always_run: true
- repo: https://github.com/pycqa/isort
rev: 5.9.2
hooks:
- id: isort
always_run: true
name: isort (python)
- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
always_run: true
exclude: ^(packages/syft/src/syft/proto|packages/syft/examples/duet)
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
always_run: true
args: ["--config=packages/syft/setup.cfg"]
# additional_dependencies:
# - flake8-kwarger
# - darglint
exclude: ^(packages/syft/src/syft/proto|packages/syft/examples/duet|packages/grid/ansible/)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
name: mypy-hagrid
always_run: true
files: ^packages/hagrid
exclude: ^(packages/syft|packages/grid)
args: [
"--ignore-missing-imports",
"--scripts-are-modules",
"--disallow-incomplete-defs",
"--no-implicit-optional",
"--warn-unused-ignores",
"--warn-redundant-casts",
"--strict-equality",
"--warn-unreachable",
# "--disallow-untyped-decorators",
"--disallow-untyped-defs",
"--disallow-untyped-calls",
"--namespace-packages",
"--install-types",
"--non-interactive",
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
name: mypy-grid
always_run: true
files: ^packages/grid
exclude: ^(packages/grid/ansible|packages/grid/backend/app/alembic/versions)
args: [
"--ignore-missing-imports",
"--scripts-are-modules",
"--disallow-incomplete-defs",
"--no-implicit-optional",
# "--warn-unused-ignores",
"--warn-redundant-casts",
"--strict-equality",
"--warn-unreachable",
# "--disallow-untyped-decorators",
"--disallow-untyped-defs",
"--disallow-untyped-calls",
"--namespace-packages",
"--install-types",
"--non-interactive",
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
name: mypy-syft
files: ^packages/syft
exclude: ^(packages/syft/src/syft/core/tensor|packages/syft/src/syft/core/adp|packages/syft/src/syft/proto|packages/syft/tests/syft/lib/python|packages/syft/examples/duet)
args: [
"--ignore-missing-imports",
"--scripts-are-modules",
"--disallow-incomplete-defs",
"--no-implicit-optional",
# "--warn-unused-ignores",
"--warn-redundant-casts",
"--strict-equality",
"--warn-unreachable",
# "--disallow-untyped-decorators",
"--disallow-untyped-defs",
"--disallow-untyped-calls",
"--no-warn-unused-ignores",
"--install-types",
"--non-interactive",
]
- repo: local
hooks:
- id: flynt
always_run: true
name: flynt
entry: flynt
exclude: ^(packages/grid/ansible)
args: [--fail-on-change]
types: [python]
language: python
additional_dependencies:
- flynt