-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
96 lines (90 loc) · 2.52 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
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [
--combine-as,
--line-length=100,
--ensure-newline-before-comments,
--force-single-line-imports,
--single-line-exclusions=typing,
--trailing-comma,
--multi-line=3,
--lines-after-imports=2,
--use-parentheses,
]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [
--line-length=120,
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: forbid-new-submodules
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
types_or: [python]
- id: trailing-whitespace
types_or: [python]
- id: debug-statements
- id: detect-private-key
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
description: Checks for common misspellings.
types_or: [python, markdown]
exclude: "trading/interactive_brokers/contracts.py,trading/adr/#/yahoo.py"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
hooks:
- id: mypy
args: [
--no-strict-optional,
--ignore-missing-imports,
--warn-no-return,
]
additional_dependencies: [
types-frozendict,
types-toml,
]
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
name: flake8 (python)
additional_dependencies:
- flake8-bandit
- flake8-bugbear
- flake8-coding
# - flake8-comprehensions
- flake8-debugger
- flake8-deprecated
# - flake8-docstrings
- flake8-pep3101
- flake8-string-format
# - flake8-rst-docstrings
- flake8-typing-imports
# - pep8-naming
types: [python]
args: [
--max-complexity=10,
--max-line-length=150,
--statistics,
--ignore=C101 E203 E252 E402 D100 D101 D102 S101 S403 W503,
--min-python-version=3.7.0,
]