-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
114 lines (114 loc) · 3.8 KB
/
.pre-commit-config.yaml
File metadata and controls
114 lines (114 loc) · 3.8 KB
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-added-large-files
- id: check-yaml
# - id: debug-statements
# - id: double-quote-string-fixer
- id: check-ast
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.10.0
hooks:
- id: reorder-python-imports
args: [
--py39-plus,
--add-import, 'from __future__ import annotations',
--application-directories=src,
]
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.0.1
hooks:
- id: add-trailing-comma
# - repo: https://github.com/asottile/setup-cfg-fmt
# rev: v1.20.0
# hooks:
# - id: setup-cfg-fmt
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.1
hooks:
- id: autoflake
args: [--in-place, --remove-all-unused-imports]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.2.0
# hooks:
# - id: mypy
# args: [--ignore-missing-imports, --disallow-untyped-defs, --disallow-any-generics]
# # args: [
# # --check-untyped-defs,
# # --disallow-any-generics,
# # --disallow-incomplete-defs,
# # --disallow-untyped-defs,
# # --no-implicit-optional,
# # --ignore-missing-imports
# # ]
# additional_dependencies: [types-all]
- repo: https://github.com/rstcheck/rstcheck
rev: v6.1.2
hooks:
- id: rstcheck
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3.10
args:
- --preview
- --line-length=120
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
language_version: python3.10.12
args: [
'--config=./.flake8',
# '--max-line-length=79',
# '--application-import-names=code_curator',
# '--use-class-attributes-order-strict-mode',
# '--import-order-style=smarkets'
]
additional_dependencies: [
'flake8-2020==1.8.1',
'flake8-encodings==0.5.0',
'flake8-bugbear==23.7.10',
'flake8-bugbear==23.7.10',
# 'flake8-requirements==1.7.8',
'flake8-secure-coding-standard==1.4.0',
'flake8-useless-assert==0.4.4',
'flake8-class-attributes-order==0.1.3',
'flake8-clean-block==0.1.2',
'flake8-comprehensions==3.14.0',
'flake8-datetimez==20.10.0',
'flake8-implicit-str-concat==0.4.0',
'flake8-picky-parentheses==0.5.0',
'flake8-return==1.2.0',
'tryceratops==2.3.2',
'flake8-no-pep420==2.7.0',
'flake8-use-pathlib==0.3.0',
'flake8-builtins==2.1.0',
# 'flake8-functions-names==0.4.0',
'pep8-naming==0.13.3',
'flake8-comments==0.1.2',
'flake8-eradicate==1.5.0',
# 'flake8-docstrings==1.7.0',
# 'flake8-docstrings-complete==1.2.0',
'flake8-type-checking==2.4.1',
'flake8-rst-docstrings==0.3.0',
'flake8-sphinx-links==0.2.1',
# 'flake8-aaa==0.16.0',
'flake8-pytest-style==1.7.2',
'flake8-jira-todo-checker',
]
# - repo: https://github.com/pre-commit/mirrors-autopep8
# rev: v1.6.0
# hooks:
# - id: autopep8