Skip to content

Commit dcb5a24

Browse files
committed
Centralize "preview: true" config for ruff
So that CI and makefile won't need to pass it with every ruff call and pre-commit hooks / manual calls will also make use of it
1 parent 9b7c4f1 commit dcb5a24

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/test_full.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ jobs:
8989
- name: Install Dependencies
9090
run: flit install --symlink
9191
- name: Ruff format
92-
run: ruff format --preview --check ninja tests
92+
run: ruff format --check ninja tests
9393
- name: Ruff lint
94-
run: ruff check --preview ninja tests
94+
run: ruff check ninja tests
9595
- name: mypy
9696
run: mypy ninja tests/mypy_test.py

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ install: ## Install dependencies
1010

1111
.PHONY: lint
1212
lint: ## Run code linters
13-
ruff format --preview --check ninja tests
14-
ruff check --preview ninja tests
13+
ruff format --check ninja tests
14+
ruff check ninja tests
1515
mypy ninja
1616

1717
.PHONY: fmt format
1818
fmt format: ## Run code formatters
19-
ruff format --preview ninja tests
20-
ruff check --preview --fix ninja tests
19+
ruff format ninja tests
20+
ruff check --fix ninja tests
2121

2222
.PHONY: test
2323
test: ## Run tests

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ dev = ["pre-commit"]
7272
[tool.ruff]
7373
target-version = "py37"
7474

75+
[tool.ruff.format]
76+
preview = true
77+
7578
[tool.ruff.lint]
79+
preview = true
7680
select = [
7781
"B", # flake8-bugbear
7882
"C", # flake8-comprehensions

0 commit comments

Comments
 (0)