Skip to content

[Docs] Enforce Black Formatting in Contributor Docs#25135

Merged
ishaan-berri merged 2 commits intomainfrom
litellm_enforce_black_formatting
Apr 6, 2026
Merged

[Docs] Enforce Black Formatting in Contributor Docs#25135
ishaan-berri merged 2 commits intomainfrom
litellm_enforce_black_formatting

Conversation

@yuneng-berri
Copy link
Copy Markdown
Collaborator

Summary

Problem

Black formatting is enforced in CI but contributor docs didn't clearly communicate this requirement, leading to avoidable CI failures.

Fix

Updated CLAUDE.md, AGENTS.md, and CONTRIBUTING.md to explicitly instruct contributors and AI coding agents to run poetry run black . before committing. Added VS Code setup guidance for human contributors.

Testing

Documentation-only change. No code changes.

Type

📖 Documentation

Black formatting is now enforced in CI. Update CLAUDE.md, AGENTS.md,
and CONTRIBUTING.md to instruct contributors and AI agents to run
`poetry run black .` before committing, and add VS Code setup guidance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Apr 5, 2026 7:30am

Request Review

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 4, 2026

Greptile Summary

This PR updates CLAUDE.md, AGENTS.md, and CONTRIBUTING.md to make Black formatting requirements explicit for both human contributors and AI coding agents. The documentation changes are clear, consistent, and directly address the stated problem of avoidable CI failures caused by missing formatting guidance.

  • AGENTS.md: Removes the misleading note that Black --check failures "do not block test runs" (they do in CI) and replaces it with a direct, bolded directive to run poetry run black . before committing.
  • CLAUDE.md: Adds the same Black formatting reminder in the Code Quality section.
  • CONTRIBUTING.md: Adds a well-structured callout block with guidance for both AI agents and VS Code users (including a ready-to-paste VS Code settings snippet).
  • Undocumented deletions: Five security-scanning files (ci_cd/security_scans.sh, ci_cd/.grype.yaml, .trivyignore, docs/my-website/.trivyignore, ui/litellm-dashboard/.trivyignore) are deleted without any mention in the PR description. These files are not referenced by any active GitHub workflow, so there is no CI breakage, but the PR description should be updated to document the intent behind these removals.
  • .github/workflows/run_llm_translation_tests.py: File mode changed from 755 (executable) to 644 (non-executable). No functional impact — the workflow already invokes this script via python ... rather than directly.

Confidence Score: 5/5

Safe to merge; documentation improvements are accurate and the deleted security files are confirmed orphaned from any active workflow.

All remaining findings are P2. The documentation changes are correct and the only substantive concern — undocumented file deletions — has no active CI impact since none of the deleted files are invoked by any GitHub workflow. No correctness, data-integrity, or reliability issues are present.

No files require special attention beyond updating the PR description to disclose the security-file deletions.

Important Files Changed

Filename Overview
CLAUDE.md Adds a bolded Black formatting directive in the Code Quality section — accurate and consistent with CI enforcement
AGENTS.md Replaces a misleading 'does not block test runs' note with a clear pre-commit Black formatting directive
CONTRIBUTING.md Adds a well-structured callout with Black guidance for AI agents and VS Code format-on-save setup
ci_cd/security_scans.sh Entire security-scan runner script deleted without mention in PR description; confirmed not referenced by any active workflow
ci_cd/.grype.yaml Grype vulnerability-scanner config deleted without explanation; not referenced by active workflows
.trivyignore Root-level Trivy CVE allowlist with documented justifications deleted; not referenced by active workflows
.github/workflows/run_llm_translation_tests.py File mode changed from executable (755) to non-executable (644); no functional impact since the workflow invokes it via 'python ...'

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Developer makes code changes] --> B{Run formatter?}
    B -- No --> C[Push to PR]
    C --> D[CI Black --check fails]
    D --> E[Fix and re-push]
    B -- Yes: poetry run black . --> F[Code is formatted]
    F --> G[Push to PR]
    G --> H[CI Black --check passes]
    H --> I[PR ready to merge]

    subgraph Guidance added in this PR
        J[CLAUDE.md and AGENTS.md] -->|AI agents| B
        K[CONTRIBUTING.md and VS Code format-on-save] -->|Human contributors| B
    end
Loading

Reviews (2): Last reviewed commit: "chore: fixes" | Re-trigger Greptile

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq bot commented Apr 4, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing litellm_enforce_black_formatting (574295d) with main (fa9e3d8)

Open in CodSpeed

@ishaan-berri ishaan-berri merged commit d2d99aa into main Apr 6, 2026
4 checks passed
@ishaan-berri ishaan-berri deleted the litellm_enforce_black_formatting branch April 6, 2026 23:51
harish876 pushed a commit to harish876/litellm that referenced this pull request Apr 8, 2026
* [Docs] Enforce Black formatting in contributor docs

Black formatting is now enforced in CI. Update CLAUDE.md, AGENTS.md,
and CONTRIBUTING.md to instruct contributors and AI agents to run
`poetry run black .` before committing, and add VS Code setup guidance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: fixes

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants