-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.pre-commit-config.yaml
133 lines (118 loc) · 3.4 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: requirements-txt-fixer
- id: check-added-large-files
args: ['--maxkb=50000']
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
- id: debug-statements
- id: mixed-line-ending
args: ['--fix=lf']
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
hooks:
- id: setup-cfg-fmt
name: Autoformat setup.cfg
args: [--min-py3-version, "3.8", "--include-version-classifiers"]
- repo: https://github.com/hadialqattan/pycln
rev: v2.1.1
hooks:
- id: pycln
name: Find and remove unused import statements
args: [--config=pyproject.toml]
- repo: https://github.com/bwhmather/ssort
rev: v0.11.6
hooks:
- id: ssort
name: Sort top level statements with ssort
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
name: Sort imports with isort
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
name: Autoformat with black
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
name: Autoformat codes in docstrings with blacken-docs
additional_dependencies: [black]
args: [-t, py38, -l, "100"]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
name: Check backsticks in rst files
- id: rst-directive-colons
name: Check directives in rst files
- repo: https://github.com/PyCQA/doc8
rev: v1.0.0
hooks:
- id: doc8
name: Check documentation formats with doc8
args: [--max-line-length, "100"]
# - repo: https://github.com/terrencepreilly/darglint
# rev: v1.8.1
# hooks:
# - id: darglint
# name: Lint docstrings with Darglint
# exclude: pydaymet/cli.py
- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
hooks:
- id: codespell
name: Checks for common misspellings in text files.
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
name: Upgrade synax to python 3.7+ with pyupgrade
args: [--py37-plus]
- repo: https://github.com/guilatrova/tryceratops
rev: v1.1.0
hooks:
- id: tryceratops
name: Check try-exceptions blocks with tryceratops
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
name: Linting with flake8
additional_dependencies:
- flake8-comprehensions
- flake8-builtins
- flake8-blind-except
- flake8-bugbear
- flake8-use-fstring
- flake8-docstrings
- flake8-simplify
- pep8-naming
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
name: Static type checking with mypy
exclude: tests
files: pydaymet
additional_dependencies:
- types-all
- xarray
- git+https://github.com/cheginit/async_retriever.git
- git+https://github.com/cheginit/pygeoogc.git
- git+https://github.com/cheginit/pygeoutils.git
- git+https://github.com/cheginit/py3dep.git
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
name: Check for security issues with bandit
args: [-lll, --recursive, pydaymet]
files: .py$