Skip to content

Commit 1659cf7

Browse files
committed
lint with ruff
1 parent 5149ad4 commit 1659cf7

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/python_checks.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ on:
132132
required: false
133133
type: string
134134
default: true
135-
135+
run_ruff:
136+
description: Flag to say if ruff should be run
137+
required: false
138+
type: string
139+
default: true
136140

137141
env:
138142
PRERELEASE: "3.15"
@@ -182,6 +186,10 @@ jobs:
182186
if: inputs.flake8-packages != ''
183187
run: flake8 ${{ inputs.flake8-packages }}
184188

189+
- name: Lint with ruff check
190+
if: ${{ inputs.run-ruff == 'true' }}
191+
run: ruff check
192+
185193
- name: Lint with pylint
186194
if: inputs.pylint-packages != ''
187195
uses: SpiNNakerManchester/SupportScripts/actions/pylint@main
@@ -282,6 +290,9 @@ jobs:
282290
rcfile: ${{ inputs.rcfile }}
283291
language: en_GB
284292

293+
- name: Lint with ruff
294+
run: ruff check
295+
285296
- name: Test with pytest
286297
if: ${{ (matrix.python-version != env.PRERELEASE || inputs.check-prereleases == 'true') && inputs.test-directories != ''}}
287298
uses: SpiNNakerManchester/SupportScripts/actions/pytest@main

actions/python-tools/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ runs:
5353
- name: Install extended Python tooling
5454
shell: bash
5555
run: |
56-
pip install flake8 "pylint $PYLINT_VERSION" pyenchant
56+
pip install flake8 "pylint $PYLINT_VERSION" pyenchant ruff
5757
if [ $DO_COVERAGE = "true" ]; then
5858
pip install "coverage $COVERAGE_VERSION" coveralls
5959
fi

0 commit comments

Comments
 (0)