Skip to content

Commit 421030d

Browse files
committed
Python lint: Replace flake8 with ruff
1 parent f7e3545 commit 421030d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ on:
99
- master
1010

1111
jobs:
12-
flake8:
12+
ruff:
1313
runs-on: ubuntu-latest
14-
1514
steps:
1615
- uses: actions/checkout@v4
17-
- name: Run flake8
18-
run: |
19-
# ignore errors for long lines and multi-statement lines
20-
pipx run flake8 --ignore=E501,E701,W503 .
16+
- uses: astral-sh/ruff-action@v2

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ To run static analysis:
306306

307307
.. code:: bash
308308
309-
python -m flake8 --ignore=E501,E701,W503 speech_recognition tests examples setup.py
309+
ruff check
310310
311311
To ensure RST is well-formed:
312312

ruff.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
line-length = 671
2+
lint.ignore = ["E701"]
3+
lint.mccabe.max-complexity = 23
4+
lint.select = ["C9", "E", "F", "W"]

setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[options.extras_require]
22
dev =
3-
flake8
4-
rstcheck
53
pytest
64
pytest-randomly
75
respx
6+
rstcheck
7+
ruff
88
audio =
99
PyAudio >= 0.2.11
1010
pocketsphinx =
@@ -13,8 +13,8 @@ whisper-local =
1313
openai-whisper
1414
soundfile
1515
openai =
16-
openai
1716
httpx < 0.28
17+
openai
1818
groq =
1919
groq
2020
httpx < 0.28

0 commit comments

Comments
 (0)