Skip to content

Commit c3a7d0d

Browse files
committed
ruff configuration for lint
1 parent 49e93ac commit c3a7d0d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[tool.poetry.group.dev.dependencies]
2+
ruff = "^0.6.9"
3+
4+
# Tool-specific configurations
5+
6+
# Ruff configuration (linter)
7+
[tool.ruff]
8+
line-length = 120 # Maximum allowed line length
9+
exclude = [
10+
"docs",
11+
"examples",
12+
"images",
13+
"website",
14+
]
15+
16+
[tool.ruff.format]
17+
quote-style = "preserve" # Preserve existing quote style (single or double)
18+
19+
[tool.ruff.lint]
20+
select = ["E", "F", "W"] # Select specific linting rules (E: Errors, F: Pyflakes, W: Warnings)
21+
ignore = [
22+
"F405", # Ignore 'import *' warnings
23+
]
24+
25+
[tool.ruff.lint.isort]
26+
force-single-line = true # Force single-line imports for better readability
27+
28+
# Black configuration (code formatter)
29+
[tool.black]
30+
line-length = 120 # Same line length limit as Ruff for consistency
31+
target-version = ['py38'] # Target Python version for formatting
32+
33+
# Flake8 configuration (for additional linting, if needed)
34+
[tool.flake8]
35+
max-line-length = 120 # Align with Ruff's line length setting
36+
ignore = [
37+
"E501", # Ignore long line warnings
38+
]

0 commit comments

Comments
 (0)