Skip to content

Commit cd9b716

Browse files
committed
Switch to Ruff for formatting
Signed-off-by: Casper Beyer <[email protected]>
1 parent c333e88 commit cd9b716

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: check
1+
name: Check
22
on:
33
push:
44
branches:
@@ -26,8 +26,4 @@ jobs:
2626
run: uv sync --dev
2727

2828
- name: Run format check
29-
run: |
30-
uv run yapf --diff --recursive nats/
31-
32-
- name: Run isort check
33-
run: uv run isort --check-only --diff nats/src
29+
run: uv run ruff format --check

pyproject.toml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
[dependency-groups]
2-
dev = [
1+
[tool.uv]
2+
dev-dependencies = [
33
"pytest>=7.0.0",
44
"pytest-asyncio>=0.21.0",
55
"pytest-cov>=7.0.0",
66
"pytest-xdist>=3.0.0",
77
"mypy>=1.0.0",
8-
"yapf>=0.40.0",
98
"ruff>=0.1.0",
10-
"isort>=5.0.0",
11-
"flake8>=7.0.0",
129
]
13-
14-
[tool.uv]
1510
workspace = { members = ["nats", "nats-server"] }
1611

1712
[tool.mypy]
@@ -22,14 +17,6 @@ follow_imports = "silent"
2217
show_error_codes = true
2318
check_untyped_defs = false
2419

25-
[tool.yapf]
26-
split_before_first_argument = true
27-
dedent_closing_brackets = true
28-
coalesce_brackets = true
29-
allow_split_before_dict_value = false
30-
indent_dictionary_value = true
31-
split_before_expression_after_opening_paren = true
32-
3320
[tool.ruff]
3421
line-length = 120
3522
target-version = "py37"
@@ -38,11 +25,9 @@ target-version = "py37"
3825
select = ["E", "F", "W", "I"]
3926
ignore = ["E501"]
4027

41-
[tool.isort]
42-
combine_as_imports = true
43-
multi_line_output = 3
44-
include_trailing_comma = true
45-
src_paths = ["nats/src", "nats/tests"]
28+
[tool.ruff.format]
29+
quote-style = "double"
30+
indent-style = "space"
4631

4732
[tool.pytest.ini_options]
4833
asyncio_mode = "auto"

0 commit comments

Comments
 (0)