Skip to content

feat: add faster linting targets for development workflow#19729

Merged
krrishdholakia merged 7 commits intoBerriAI:litellm_oss_staging_02_04_2026from
jquinter:feature/faster-linter
Feb 4, 2026
Merged

feat: add faster linting targets for development workflow#19729
krrishdholakia merged 7 commits intoBerriAI:litellm_oss_staging_02_04_2026from
jquinter:feature/faster-linter

Conversation

@jquinter
Copy link
Contributor

Relevant issues

Couldn't find an open issue, but on my experience, ruff linter runs slowwww because of checking absolutely the whole basecode. All of it. This PR introduces an improved version for running ruff linter, when developing.

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
🧹 Refactoring
🚄 Infrastructure
✅ Test

Changes

  • Add lint-dev target that only checks changed files vs origin/main
  • Add lint-format-changed to format only modified Python lines
  • Add lint-ruff-dev using diff-quality for incremental lint checks
  • Upgrade ruff from 0.1.x to 0.2.x for --range formatting support
  • Add pylint and diff-cover as dev dependencies
  • Use portable PIP variable for cross-platform compatibility
  • Suppress poetry warnings in install-dev target

- Add lint-dev target that only checks changed files vs origin/main
- Add lint-format-changed to format only modified Python lines
- Add lint-ruff-dev using diff-quality for incremental lint checks
- Upgrade ruff from 0.1.x to 0.2.x for --range formatting support
- Add pylint and diff-cover as dev dependencies
- Use portable PIP variable for cross-platform compatibility
- Suppress poetry warnings in install-dev target
@vercel
Copy link

vercel bot commented Jan 25, 2026

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 3, 2026 6:04pm

Request Review

jquinter and others added 2 commits February 3, 2026 14:27
The type: ignore[attr-defined] comment was on the import alias line
inside parentheses, but mypy reports the error on the `from` line.
Collapse to single-line imports so the suppression is on the correct
line. Also add no-redef to the fallback branch.
- Remove poetry lock/check from install-dev (slow, can mutate lockfile)
- Remove misplaced [virtualenvs] and [installer] from pyproject.toml
  (these belong in poetry.toml, not project metadata)
- Remove unused pylint dev dependency (diff-quality uses pylint output
  format, not the pylint package itself)
- Fix trailing whitespace in .PHONY declaration
- Use mktemp instead of hardcoded /tmp/ruff.txt in lint-ruff-dev
- Guard lint-ruff-FULL-dev against empty file list from git diff
- Fix incorrect comment on lint-dev target
- Regenerate poetry.lock

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove poetry lock/check from install-dev (slow, can mutate lockfile)
- Remove misplaced [virtualenvs] and [installer] from pyproject.toml
  (these belong in poetry.toml, not project metadata)
- Remove unused pylint dev dependency (diff-quality uses pylint output
  format, not the pylint package itself)
- Fix trailing whitespace in .PHONY declaration
- Use mktemp instead of hardcoded /tmp/ruff.txt in lint-ruff-dev
- Guard lint-ruff-FULL-dev against empty file list from git diff
- Fix incorrect comment on lint-dev target
- Regenerate poetry.lock
@jquinter
Copy link
Contributor Author

jquinter commented Feb 3, 2026

Integrated #20351 in order to make lint pass.

@krrishdholakia krrishdholakia changed the base branch from main to litellm_oss_staging_02_04_2026 February 4, 2026 06:29
@krrishdholakia krrishdholakia merged commit 18f4b72 into BerriAI:litellm_oss_staging_02_04_2026 Feb 4, 2026
6 of 8 checks passed
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.

2 participants