Skip to content

Commit ec0df8a

Browse files
committed
fix: use root-level ruff.toml instead of sdk/python config
The sdk/python config has strict docstring rules (D*) that don't apply to scripts outside sdk/python/. Add a minimal root-level ruff.toml with basic E/F/I rules only.
1 parent d71ef88 commit ec0df8a

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

prek.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ pass_filenames = false
3939
repo = "https://github.com/astral-sh/ruff-pre-commit"
4040
rev = "v0.11.4"
4141
hooks = [
42-
{ id = "ruff", args = ["--fix", "--config", "sdk/python/pyproject.toml"] },
43-
{ id = "ruff-format", args = ["--config", "sdk/python/pyproject.toml"] },
42+
{ id = "ruff", args = ["--fix"] },
43+
{ id = "ruff-format" },
4444
]
4545

4646
# --- Go: go vet ---

ruff.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: © 2025 Phala Network <dstack@phala.network>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Root-level ruff config for pre-commit hooks.
6+
# sdk/python/ has its own stricter config in pyproject.toml.
7+
8+
line-length = 88
9+
10+
[lint]
11+
select = [
12+
"E", # pycodestyle errors
13+
"F", # pyflakes
14+
"I", # isort
15+
]
16+
ignore = [
17+
"E203", # whitespace before ':'
18+
"E501", # line too long (handled by formatter)
19+
]

0 commit comments

Comments
 (0)