Skip to content

Commit 79c2b38

Browse files
committed
feat: Add comprehensive Ruff documentation and update configuration in pyproject.toml
1 parent a042cf7 commit 79c2b38

3 files changed

Lines changed: 26 additions & 19 deletions

File tree

Makefile.jinja

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,8 @@ install: check ## Install project dependencies
2020
{% if "pytest" in dev_deps -%}
2121
test: ## Run all unit tests
2222
@uv run pytest tests/unit/
23-
2423
{% endif -%}
25-
{% if "ruff" in dev_deps -%}
26-
lint: ## Check code quality with ruff
27-
uv run ruff check --fix src/ tests/
28-
29-
format: ## Format code with ruff
30-
uv run ruff format --check src/ tests/
3124

32-
lint-fix: ## Auto-fix linting issues with ruff
33-
uv run ruff check --fix --unsafe-fixes src/ tests/
34-
35-
{% endif -%}
3625
clean: ## Clean build artifacts
3726
@echo "Cleaning Python artifacts.."
3827
@rm -rf build/ dist/ *.egg-info/ .pytest_cache/ htmlcov/ .coverage

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,21 @@ filterwarnings = [
5151
[tool.ruff]
5252
line-length = 120
5353
target-version = "py310"
54+
55+
[tool.ruff.lint]
56+
select = [
57+
"E", # pycodestyle errors
58+
"F", # Pyflakes
59+
"UP", # pyupgrade
60+
"B", # flake8-bugbear
61+
"I", # isort
62+
]
63+
ignore = [
64+
"E501", # line-too-long (formatter handles wrapping, but may exceed limit)
65+
]
66+
67+
[tool.ruff.format]
68+
quote-style = "double"
69+
indent-style = "space"
70+
skip-magic-trailing-comma = false
71+
line-ending = "auto"

pyproject.toml.jinja

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ target-version = "py310"
4949

5050
[tool.ruff.lint]
5151
select = [
52-
"E", # pycodestyle errors
53-
"W", # pycodestyle warnings
54-
"F", # pyflakes
55-
"I", # isort
56-
"B", # flake8-bugbear
57-
"C4", # flake8-comprehensions
58-
"UP", # pyupgrade
52+
"E", # pycodestyle errors
53+
"F", # Pyflakes
54+
"UP", # pyupgrade
55+
"B", # flake8-bugbear
56+
"I", # isort
5957
]
6058
ignore = [
61-
"E501", # line too long, handled by black
59+
"E501", # line-too-long (formatter handles wrapping, but may exceed limit)
6260
]
6361

6462
[tool.ruff.format]
6563
quote-style = "double"
6664
indent-style = "space"
65+
skip-magic-trailing-comma = false
66+
line-ending = "auto"
6767
{%- endif %}

0 commit comments

Comments
 (0)