feat: standardize ruff config to line-length=88, select=E,F,I,W #55
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-mcp!55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "54-standardize-ruff-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Aligns pal-e-mcp to the platform-wide ruff standard (line-length=88, select=E,F,I,W) decided 2026-03-28. Fixes all E501 violations introduced by the shorter line length and adds a pre-commit hook for ruff.
Changes
pyproject.toml-- setline-length = 88(was 120), reorder select to["E", "F", "I", "W"].pre-commit-config.yaml-- new file with ruff + ruff-format pre-commit hookssrc/pal_e_mcp/tools/__init__.py-- shorten docstring to fit 88 charssrc/pal_e_mcp/tools/blocks.py-- wrap long Field descriptions and docstrings into multi-line stringssrc/pal_e_mcp/tools/boards.py-- wrap long Field descriptions and docstrings into multi-line stringssrc/pal_e_mcp/tools/links.py-- wrap long Field description and docstringsrc/pal_e_mcp/tools/notes.py-- wrap long Field descriptions and docstrings into multi-line stringssrc/pal_e_mcp/tools/projects.py-- wrap long docstringsrc/pal_e_mcp/tools/repos.py-- reformatted by ruff formattests/test_param_alignment.py-- shorten one long docstring, reformatted by ruff formatTest Plan
ruff check .-- zero violationsruff format --check .-- all files formattedpytest tests/ -v-- 61/61 tests pass, no regressionsReview Checklist
line-length = 88andselect = ["E", "F", "I", "W"]ruff check .passes cleanruff format --check .passes cleanRelated Notes
None.
Related
PR #55 Review
DOMAIN REVIEW
Tech stack: Python / FastMCP / Pydantic / ruff / pre-commit
This PR is a config standardization change -- updating ruff from
line-length=120toline-length=88and settingselect=["E", "F", "I", "W"]. The code changes are exclusively line-wrapping reformats to comply with the shorter line limit, plus a new.pre-commit-config.yaml.pyproject.toml --
line-length = 88andselect = ["E", "F", "I", "W"]are correctly set. Theruff>=0.15dev dependency is present.Source files -- All 8 tool modules (
__init__.py,blocks.py,boards.py,links.py,notes.py,projects.py,repos.py,tags.py) andserver.pyhave zero lines exceeding 88 characters. The wrapping style is consistent: longField(description=...)strings are broken into parenthesized multi-line strings.Tests --
tests/test_param_alignment.pyandtests/conftest.pyalso have no lines exceeding 88 characters. 61 tests cover the MCP-to-SDK parameter boundary thoroughly (CSV splitting, field renames, JSON parsing, error paths, edge cases).No behavioral changes -- All diffs are whitespace/line-wrapping only. No logic, imports, or API signatures were modified. This is purely a formatting PR.
BLOCKERS
None.
NITS
Pre-commit ruff version mismatch with CI:
.pre-commit-config.yamlpinsrev: v0.11.6but.woodpecker.ymlinstallsruff==0.15.2andpyproject.tomlrequiresruff>=0.15. The pre-commit hook would run ruff 0.11.6 (much older) while CI runs 0.15.2. Different ruff versions can disagree on formatting and rule behavior. Recommend aligning the pre-commit rev to match CI (rev: v0.15.2).CI lints
src/only, nottests/:.woodpecker.ymlrunsruff check src/andruff format --check src/, but the test files also contain Python code subject to the same ruff config. The pre-commit hook would catchtests/locally, but CI would not. Consider addingtests/to the CI lint commands for parity:ruff check src/ tests/andruff format --check src/ tests/.PR body template: The PR uses
## Related Notes(says "None") and## Review Checklistwhich are not in the standard SOP template (## Summary,## Changes,## Test Plan,## Related). Minor deviation -- the required sections are all present, but the extra sections add noise.SOP COMPLIANCE
54-standardize-ruff-configmatches issue #54)pal-e-platform#29as parent issue but no pal-e-docs plan slug. Acceptable for a config standardization task that likely has no plan.PROCESS OBSERVATIONS
VERDICT: APPROVED