Skip to content

Commit aaf6151

Browse files
author
Robert Johnson
committed
add pre-commit to nerve-tools + format
1 parent 09de329 commit aaf6151

23 files changed

Lines changed: 1389 additions & 1072 deletions

.pre-commit-config.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
default_language_version:
3+
python: python3.12
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v2.1.0
7+
hooks:
8+
- id: trailing-whitespace
9+
- id: end-of-file-fixer
10+
exclude: CHANGELOG.md
11+
- id: check-docstring-first
12+
- id: check-json
13+
exclude: dockerfiles/itest/itest/nerve\.conf\.json
14+
- id: check-yaml
15+
exclude: /template/
16+
- id: debug-statements
17+
- id: name-tests-test
18+
- id: requirements-txt-fixer
19+
- id: fix-encoding-pragma
20+
args: [--remove]
21+
- id: pretty-format-json
22+
exclude: dockerfiles/itest/itest/nerve\.conf\.json
23+
args: [
24+
'--autofix',
25+
'--indent', '4',
26+
'--no-sort-keys',
27+
]
28+
- repo: https://github.com/PyCQA/isort
29+
rev: 5.13.2
30+
hooks:
31+
- id: isort
32+
- repo: https://github.com/asottile/pyupgrade
33+
rev: v1.12.0
34+
hooks:
35+
- id: pyupgrade
36+
args: [--py36-plus]
37+
- repo: https://github.com/psf/black
38+
rev: 24.4.2
39+
hooks:
40+
- id: black
41+
args: ['--target-version', 'py312']
42+
- repo: https://github.com/PyCQA/flake8
43+
rev: 7.3.0
44+
hooks:
45+
- id: flake8
46+
args: ['--extend-ignore', 'E203,E231,E501,E701,E704']
47+
- repo: https://github.com/Yelp/detect-secrets
48+
rev: 0.9.1
49+
hooks:
50+
- id: detect-secrets
51+
args: ['--baseline', '.secrets.baseline']
52+
exclude: .*tests/.*|\.pre-commit-config\.yaml

.secrets.baseline

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"exclude_regex": ".*tests/.*|\\.pre-commit-config\\.yaml",
3+
"generated_at": "2026-03-17T00:00:00Z",
4+
"plugins_used": [
5+
{
6+
"base64_limit": 4.5,
7+
"name": "Base64HighEntropyString"
8+
},
9+
{
10+
"hex_limit": 3,
11+
"name": "HexHighEntropyString"
12+
},
13+
{
14+
"name": "PrivateKeyDetector"
15+
}
16+
],
17+
"results": {},
18+
"version": "0.9.1"
19+
}

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202-

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package_%:
1616

1717
.PHONY: mypy
1818
mypy:
19-
cd src && tox -e mypy
19+
tox -e mypy
2020

2121
.PHONY: clean
2222
clean:
@@ -39,4 +39,4 @@ release:
3939

4040
.PHONY: test
4141
test:
42-
$(MAKE) -C src test
42+
tox -e tests,mypy

0 commit comments

Comments
 (0)