This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.pre-commit-config.yaml
74 lines (67 loc) · 1.74 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
- id: check-toml
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-use-type-annotations
- id: python-check-blanket-noqa
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
exclude: ^chainlibpy/generated/
# TODO: exclude files doesn't work
#- repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.931
# hooks:
# - id: mypy
# # NOTE: this hook does NOT read "files" and "exclude" configs from mypy configuration files
# files: ^chainlibpy/
# # TODO to fix type errors in amino directory
# exclude: ^chainlibpy/(generated/|amino/)
# # NOTE: need to add additional_dependencies explicitly
# additional_dependencies:
# - grpc-stubs==1.24.7
# - types-PyYAML==6.0.4
# - types-protobuf==3.19.8
# - types-requests==2.27.8
# - types-toml==0.10.3
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
# TODO FIX chainlibpy/amino/message.py:284:5: A003 class attribute "id" is shadowing a python builtin
# when enable flake8-builtins option
# - flake8-builtins
- flake8-comprehensions
- repo: https://github.com/myint/docformatter
rev: v1.4
hooks:
- id: docformatter
args:
- ./chainlibpy
- --recursive
- --in-place
- --exclude
- chainlibpy/generated
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.13
hooks:
- id: mdformat
args:
- CHANGELOG.md
- CONTRIBUTING.md
- README.md
additional_dependencies:
- mdformat-black
- mdformat-toc