@@ -107,43 +107,29 @@ extras =
107
107
commands =
108
108
bash tools/mypywrap.sh {posargs}
109
109
110
- [testenv:codespell]
111
- description =
112
- Run codespell to check spelling.
113
- deps =
114
- pre-commit
115
- commands =
116
- pre-commit run codespell --all-files --show-diff-on-failure
117
-
118
110
[testenv:pep8]
119
111
description =
120
112
Run style checks.
121
113
deps =
122
- {[testenv]deps}
123
- {[testenv:codespell]deps}
124
- autopep8
114
+ pre-commit
125
115
extras =
126
116
commands =
127
- {[testenv:mypy]commands}
128
- {[testenv:codespell]commands}
129
- # check if autopep8 would alter the formatting but don't actually change it
130
- # so we can gate on this in the ci
131
- autopep8 --exit-code --max-line-length =79 --diff -r nova doc setup.py
132
- # since autopep8 only tries to make minimal changes to conform to pep8 we still need to run
133
- # our hacking and flake8 check to keep our existing code style consistent.
134
- # The full list of issues addressable by autopep8 can be found here
135
- # https://pypi.org/project/autopep8/#features
136
- bash tools/flake8wrap.sh {posargs}
137
- # Check that all JSON files don't have \r\n in line.
138
- bash -c " ! find doc/ -type f -name *.json | xargs grep -U -n $'\r'"
139
- # Check that all included JSON files are valid JSON
140
- bash -c ' ! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
117
+ pre-commit run --all-files --show-diff-on-failure
141
118
142
119
[testenv:autopep8]
143
120
extras =
144
- deps = autopep8
121
+ deps =
122
+ pre-commit
123
+ commands =
124
+ pre-commit run --all-files --show-diff-on-failure autopep8
125
+
126
+ [testenv:codespell]
127
+ description =
128
+ Run codespell to check spelling.
129
+ deps =
130
+ pre-commit
145
131
commands =
146
- autopep8 --exit-code --max-line-length =79 --in-place -r nova doc setup.py
132
+ pre-commit run --all-files --show-diff-on-failure codespell
147
133
148
134
[testenv:fast8]
149
135
description =
0 commit comments