Skip to content

Commit 1ba876c

Browse files
committed
replace flake8 with ruff
1 parent 2c71272 commit 1ba876c

File tree

4 files changed

+16
-45
lines changed

4 files changed

+16
-45
lines changed

.flake8

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/python-package.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ jobs:
2929
- name: Install dependencies
3030
run: uv sync --locked --all-extras --dev
3131

32-
- name: Lint with flake8
32+
- name: Lint with ruff
3333
run: |
3434
# stop the build if there are Python syntax errors or undefined names
35-
uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
uv run ruff check --select=E9,F63,F7,F82 --output-format=github
3636
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
uv run flake8 . --count --exit-zero --statistics
37+
uv run ruff check --exit-zero --output-format=github
38+
3839
- name: Test with pytest
3940
run: |
4041
uv run pytest

pyproject.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ dev = [
3535
"uv>=0.9.30",
3636
]
3737
lint = [
38-
"flake8>=7.3.0",
3938
"pylint>=4.0.4",
4039
"ruff>=0.15.0",
4140
]
@@ -47,6 +46,18 @@ test = [
4746

4847
[tool.ruff]
4948
line-length = 127
49+
preview = true
50+
51+
[tool.ruff.lint]
52+
extend-select = [
53+
"C90", # mccabe
54+
"E", # pycodestyle
55+
"W", # pycodestyle
56+
"F", # pyflakes
57+
]
58+
59+
[tool.ruff.lint.mccabe]
60+
max-complexity = 10
5061

5162
[tool.pylint.main]
5263
max-line-length = 127

uv.lock

Lines changed: 0 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)