File tree Expand file tree Collapse file tree 6 files changed +21
-33
lines changed
Expand file tree Collapse file tree 6 files changed +21
-33
lines changed Original file line number Diff line number Diff line change 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 : |
Load Diff This file was deleted.
Original file line number Diff line number Diff 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+
194198Install required development tools::
195199
196200 pip install ".[development]"
197- pre-commit install
198201
199202Install 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
205210This installs dependencies in your virtual environment
206211with pointers directly to the pymodbus directory,
207212so 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-
211214The 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.
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
66
77
88codespell
9- pre-commit run --all-files
9+ ruff check --fix --exit-non-zero-on-fix .
1010pylint --recursive=y examples pymodbus test
1111mypy pymodbus
1212pytest --numprocesses auto
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Redirect output to stderr.
4+ exec 1>&2
5+
6+ pwd
7+
8+ exec ruff check --fix --exit-non-zero-on-fix .
Original file line number Diff line number Diff 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" ,
@@ -242,7 +241,8 @@ exclude = [
242241 " .venv" ,
243242 " .git" ,
244243 " build" ,
245- " doc"
244+ " doc" ,
245+ " contrib"
246246]
247247line-length = 88
248248# indent-width = 4
You can’t perform that action at this time.
0 commit comments