Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python lint: Replace flake8 with ruff #806

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ on:
- master

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

steps:
- uses: actions/checkout@v4
- name: Run flake8
run: make lint
- uses: astral-sh/ruff-action@v3
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ To run static analysis:

.. code:: bash

make lint
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"]
7 changes: 5 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[options.extras_require]
dev =
numpy
pytest
pytest-randomly
respx
numpy
rstcheck
ruff

audio =
PyAudio >= 0.2.11
pocketsphinx =
Expand All @@ -16,8 +19,8 @@ whisper-local =
faster-whisper =
faster-whisper
openai =
openai
httpx < 0.28
openai
groq =
groq
httpx < 0.28
Expand Down
Loading