Skip to content

Commit 7cc4bfd

Browse files
committed
Add ruff to lint.yml
1 parent b1219b2 commit 7cc4bfd

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ jobs:
1414
run: uv lock --check
1515
- name: Verify against basedpyright baseline
1616
run: uv run --frozen basedpyright
17+
- name: Lint with ruff
18+
run: uv run --frozen ruff check
19+
- name: Format with ruff
20+
run: uv run --frozen ruff format --diff

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,22 @@ reportUnknownMemberType = false
8484
reportUnusedCallResult = false
8585

8686
# https://docs.astral.sh/ruff/configuration/
87+
[tool.ruff]
88+
line-length = 120
89+
8790
[tool.ruff.lint]
8891
fixable = ["ALL"]
8992
select = [
9093
"ANN", # flake-8-annotations
94+
"B", # flake8-bugbear
9195
"C4", # comprehensions
9296
"DOC", # pydocstyle
9397
"E", # pycodestyle
9498
"F", # pyflakes
9599
"I", # isort
96100
"PT", # flake-8-pytest-rules
97101
"RUF", # ruff-specific rules
102+
"SIM", # flake8-simplify
98103
"UP", # pyupgrade
99104
]
100105
ignore = [
@@ -103,3 +108,6 @@ ignore = [
103108

104109
[tool.ruff.lint.isort]
105110
combine-as-imports = true
111+
112+
[tool.ruff.format]
113+
docstring-code-format = true

0 commit comments

Comments
 (0)