Skip to content

Commit

Permalink
Python lint: Replace flake8 with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Dec 10, 2024
1 parent f7e3545 commit 421030d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ on:
- master

jobs:
flake8:
ruff:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run flake8
run: |
# ignore errors for long lines and multi-statement lines
pipx run flake8 --ignore=E501,E701,W503 .
- uses: astral-sh/ruff-action@v2
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ To run static analysis:

.. code:: bash
python -m flake8 --ignore=E501,E701,W503 speech_recognition tests examples setup.py
ruff check
To ensure RST is well-formed:

Expand Down
4 changes: 4 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line-length = 671
lint.ignore = ["E701"]
lint.mccabe.max-complexity = 23
lint.select = ["C9", "E", "F", "W"]
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[options.extras_require]
dev =
flake8
rstcheck
pytest
pytest-randomly
respx
rstcheck
ruff
audio =
PyAudio >= 0.2.11
pocketsphinx =
Expand All @@ -13,8 +13,8 @@ whisper-local =
openai-whisper
soundfile
openai =
openai
httpx < 0.28
openai
groq =
groq
httpx < 0.28
Expand Down

0 comments on commit 421030d

Please sign in to comment.