-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
98 lines (92 loc) · 2.73 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
repos:
- repo: local
hooks:
- id: check-header
name: Check Python File Headers
entry: python tools/check_header.py
language: system
types: [python]
files: '\.py$'
- repo: https://github.com/pycqa/isort
rev: 5.13.2 # Use the specified version of isort
hooks:
- id: isort
args:
- --profile=black # Set the import order style (change 'google' to your preferred style)
- repo: https://github.com/myint/autoflake
rev: v2.3.1 # Use the latest version of autoflake
hooks:
- id: autoflake
args:
- --expand-star-imports
- --remove-all-unused-imports
- --remove-unused-variables
- --in-place
- --exclude=__init__.py
- --remove-duplicate-keys
- repo: https://github.com/ambv/black
rev: 24.8.0
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2 # Use the latest MyPy version
hooks:
- id: mypy
files: ^bitcoin_safe/|^tools/
args:
- --check-untyped-defs
# - --disallow-untyped-defs
# - --disallow-incomplete-defs
# - --strict-optional
- --implicit-optional
- --strict-equality
# - --warn-return-any
- --warn-redundant-casts
- --warn-unreachable
# - --disallow-any-generics
# - --strict
- --install-types
- --non-interactive
- --ignore-missing-imports
- --show-error-codes
additional_dependencies:
- types-requests
- types-PyYAML
- types-toml
- pytest-mypy
- types-Pillow
- types-reportlab
- pyqt6
- "bdkpython==0.32.0"
- repo: local
hooks:
- id: update-poetry-version
name: Update Poetry Version
entry: python .update_version.py
language: python
always_run: true
files: pyproject.toml
additional_dependencies:
- tomlkit
# - repo: https://github.com/PyCQA/bandit
# rev: 1.7.6 # Use the latest version
# hooks:
# - id: bandit
# args: ['--exclude', 'tests', '-f', 'json', '-o', 'report-bandit.json']
# - repo: https://github.com/pylint-dev/pylint
# rev: v3.0.3 # Use the latest version
# hooks:
# - id: pylint
# - repo: local
# hooks:
# - id: pytest
# name: pytest
# entry: pytest
# language: system
# types: [python]
# - repo: https://github.com/myint/docformatter
# rev: v1.7.5 # Use the latest version
# hooks:
# - id: docformatter
# args: [--in-place]