Skip to content

Commit 5b27c03

Browse files
committed
improve ruff configs
1 parent 2ebb1ea commit 5b27c03

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55
jobs:
66
lint:
77
if: "!contains(github.event.head_commit.message, '--no-ci')"
8-
name: Run Linter
8+
name: Run Ruff
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
@@ -19,8 +19,10 @@ jobs:
1919
poetry env use "3.11.3"
2020
poetry export --only lint --output lint-requirements.txt
2121
pip install -r lint-requirements.txt
22-
- name: Run Ruff
22+
- name: Ruff Linter
2323
run: ruff check --output-format=github .
24+
- name: Ruff Formatter
25+
run: ruff format . --check
2426
test:
2527
if: "!contains(github.event.head_commit.message, '--no-ci')"
2628
name: Run Tests

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ logs:
1919
down:
2020
docker compose down
2121

22+
ruff:
23+
ruff format .
24+
ruff check . --fix
25+
2226
test:
2327
docker exec -it chat-backend python -m pytest -svv $(target)
2428

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ build-backend = "poetry.core.masonry.api"
5151

5252
[tool.ruff]
5353
line-length = 120
54+
exclude = ["alembic"]
5455

5556
[tool.ruff.lint]
5657
extend-select = ["W", "E", "I"]

0 commit comments

Comments
 (0)