Skip to content

Commit 8439ab3

Browse files
committed
Remove pre-commit.
1 parent 0108921 commit 8439ab3

File tree

6 files changed

+17
-32
lines changed

6 files changed

+17
-32
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ jobs:
6666
path: ${{ env.VIRTUAL_ENV }}
6767
key: >-
6868
${{ runner.os }}-${{ matrix.python }}-venv-${{
69-
hashFiles('pyproject.toml') }}-${{
70-
hashFiles('.pre-commit-config.yaml') }}
69+
hashFiles('pyproject.toml') }}
7170
7271
- name: Create venv (NEW CACHE)
7372
if: steps.cache-venv.outputs.cache-hit != 'true'
@@ -96,10 +95,10 @@ jobs:
9695
run: |
9796
mypy pymodbus
9897
99-
- name: precommit
98+
- name: ruff
10099
if: matrix.run_lint == true
101100
run: |
102-
pre-commit run --all-files
101+
ruff .
103102
104103
- name: pytest
105104
run: |

.pre-commit-config.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,26 @@ or the bleeding edge::
191191

192192
git checkout dev
193193

194+
Some distributions have an old pip, which needs to be upgraded:
195+
196+
pip install --upgrade pip
197+
194198
Install required development tools::
195199

196200
pip install ".[development]"
197-
pre-commit install
198201

199202
Install all (allows creation of documentation etc):
200203

201204
pip install ".[all]"
202-
pre-commit install
203205

206+
Install git hooks, that helps control the commit and avoid errors when submitting a Pull Request:
207+
208+
cp githooks/* .git/hooks
204209

205210
This installs dependencies in your virtual environment
206211
with pointers directly to the pymodbus directory,
207212
so any change you make is immediately available as if installed.
208213

209-
It will also install :code:`pre-commit` git hooks, ensuring your commit are verified.
210-
211214
The repository contains a number of important branches and tags.
212215
* **dev** is where all development happens, this branch is not always stable.
213216
* **master** is where are releases are kept.

check_ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
66

77

88
codespell
9-
pre-commit run --all-files
9+
ruff check --fix --exit-non-zero-on-fix .
1010
pylint --recursive=y examples pymodbus test
1111
mypy pymodbus
1212
pytest --numprocesses auto

githooks/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
# Redirect output to stderr.
4+
exec 1>&2
5+
6+
exec ruff check --fix --exit-non-zero-on-fix .

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ development = [
6868
"codespell>=2.2.2",
6969
"coverage>=7.1.0",
7070
"mypy>=1.6.0",
71-
"pre-commit>=3.5.0",
7271
"pylint>=2.17.2",
7372
"pytest>=7.3.1",
7473
"pytest-asyncio>=0.20.3",

0 commit comments

Comments
 (0)