Skip to content

Commit 9217dae

Browse files
add precommit hook, contributes to #67
1 parent 45b5492 commit 9217dae

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

.pre-commit-config.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
3+
# To install pre-commit hooks, install `pre-commit` and activate it here:
4+
# pip3 install pre-commit
5+
# pre-commit install
6+
#
7+
default_stages:
8+
- commit
9+
- push
10+
- manual
11+
12+
repos:
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v2.3.0
15+
hooks:
16+
- id: check-yaml
17+
- id: trailing-whitespace
18+
args: [--markdown-linebreak-ext=md]
19+
- repo: https://github.com/PyCQA/flake8
20+
rev: 5.0.4
21+
hooks:
22+
- id: flake8
23+
- repo: https://github.com/brainelectronics/micropython-package-validation
24+
rev: 0.5.0
25+
hooks:
26+
- id: upy-package
27+
args:
28+
- "--setup_file=setup.py"
29+
- "--package_changelog_file=changelog.md"
30+
- "--package_file=package.json"
31+
- "--validate"
32+
- repo: https://github.com/brainelectronics/changelog2version
33+
rev: 0.10.0
34+
hooks:
35+
- id: changelog2version
36+
args:
37+
- "--changelog_file=changelog.md"
38+
- "--version_file=umodbus/version.py"
39+
- "--validate"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
]
3939
],
4040
"deps": [],
41-
"version": "2.3.4"
41+
"version": "2.3.5"
4242
}

requirements-test.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
coverage>=6.4.2,<7
44
flake8>=5.0.0,<6
55
nose2>=0.12.0,<1
6+
pre-commit>=3.3.3,<4
67
setup2upypackage>=0.4.0,<1
78
yamllint>=1.29,<2

0 commit comments

Comments
 (0)