Repository navigation
chore(lint): remove dead E501 config, fix stale blame-ignore SHAs, note 120 line width - #31927
Conversation
…te 120 width in CLAUDE.md E501 sat in both lint.ignore and lint.extend-select in ruff.toml; ignore wins, so no line length was linted at all (verified: a 130-char line passes ruff check while T201 fires). Remove it from both lists so the config tells the truth: the formatter's wrap width is the only line-length control, matching how the repo has actually behaved since E501 was ignored in Oct 2024 .git-blame-ignore-revs listed the pre-squash PR-head SHAs for the two ruff reformat commits (#31317, #31518), which never landed on the branch, so git blame ignored nothing. Replace them with the squash-merge SHAs that are actually in history Also document in CLAUDE.md that the line length is 120 (ruff.toml), not 88, so agents stop wrapping to the old Black width
Greptile SummaryPure lint-config housekeeping with no functional code changes. The E501 removal from
Confidence Score: 5/5Safe to merge — all four files are config/documentation only, no production code is touched. Every change is config or documentation: the ruff.toml edit removes a self-cancelling E501 entry that had zero effect on enforcement, the .git-blame-ignore-revs SHAs are verified against branch history, and the CLAUDE.md and Makefile edits are accurate prose updates. Nothing here can cause a runtime regression. No files require special attention.
|
| Filename | Overview |
|---|---|
| ruff.toml | Removes E501 from both lint.ignore and lint.extend-select; since ignore wins over extend-select, E501 was already unenforced — net linting behavior is unchanged |
| .git-blame-ignore-revs | Replaces two pre-squash PR-head SHAs (not in branch history) with the actual squash-merge SHAs so git blame correctly skips the large formatting commits |
| CLAUDE.md | Adds one-line note that Python line length is 120 (not 88) to steer agents and contributors away from the old Black default |
| Makefile | Trims 'E501' from the comment describing what ruff.toml controls, keeping it accurate after the ruff.toml cleanup |
Reviews (1): Last reviewed commit: "fix: make CLAUDE.md more concise" | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…te 120 line width (BerriAI#31927) * chore(lint): remove dead E501 config, fix stale blame-ignore SHAs, note 120 width in CLAUDE.md E501 sat in both lint.ignore and lint.extend-select in ruff.toml; ignore wins, so no line length was linted at all (verified: a 130-char line passes ruff check while T201 fires). Remove it from both lists so the config tells the truth: the formatter's wrap width is the only line-length control, matching how the repo has actually behaved since E501 was ignored in Oct 2024 .git-blame-ignore-revs listed the pre-squash PR-head SHAs for the two ruff reformat commits (BerriAI#31317, BerriAI#31518), which never landed on the branch, so git blame ignored nothing. Replace them with the squash-merge SHAs that are actually in history Also document in CLAUDE.md that the line length is 120 (ruff.toml), not 88, so agents stop wrapping to the old Black width * fix: make CLAUDE.md more concise * fix: make the guideline more clear
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Config-only change, so the proof is that each removed piece was demonstrably dead and lint still passes after
E501 was inert before this PR. A 130-char line passes
ruff checkunder the old config while a rule that is genuinely enabled (T201) fires, showing the config loads fine and E501 specifically is suppressed bylint.ignore:After the removal, the full lint run is still clean:
For the blame-ignore fix, the listed SHAs were the PR-head commits of #31317 and #31518, which never landed on this branch because both PRs were squash merged; the commits actually in history are the squash SHAs this PR swaps in (verifiable in the GitHub UI: the old SHAs 430b5b8 and 3dfbeab are not reachable from litellm_internal_staging, while 17bfd41 and 48b5a5a are the commits on the branch)
Type
🧹 Refactoring
Changes
Three small pieces of lint-config housekeeping surfaced while auditing the line-length setup
ruff.toml had E501 in both
lint.ignoreandlint.extend-select. Ignore wins, so no maximum line length has actually been linted since E501 was added to the ignore list back in Oct 2024; the formatter's wrap width (line-length = 120) is the only real control. This PR removes E501 from both lists so the config stops implying an enforcement that does not exist, and updates the Makefile comment that mentioned E501 accordingly. No# noqa: E501directives exist in linted paths, so nothing is orphaned.git-blame-ignore-revs listed the pre-squash PR-head SHAs for the two ruff reformat commits (#31317 and #31518). Since both PRs were squash merged, those SHAs are not ancestors of the branch and git blame (and the GitHub blame UI) ignored nothing for the two largest formatting commits in the repo. They are replaced with the squash-merge SHAs that are actually in history. The prettier entry for #29622 was checked and already points at the real squash commit
CLAUDE.md now states that the Python line length is 120, not 88, so agents and contributors stop wrapping new code to the old Black width
Replaces #31926 (same commits, moved off a claude/ prefixed branch to follow the internal branch naming convention)