mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #22576] [MERGED] feat: add ruff linter & formatter #49812
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22576
Author: @ashm-dev
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/15/2026
Merged by: @tjbck
Base:
dev← Head:riff📝 Commits (4)
a4e7096chore: add ruff linter with base config921ad4dci: add ruff pre-commit hook4573448ci: add ruff github actions workflow95e9ffbci: run ruff only on changed files📊 Changes
3 files changed (+84 additions, -0 deletions)
View changed files
➕
.github/workflows/ruff.yml(+49 -0)➕
.pre-commit-config.yaml(+8 -0)📝
pyproject.toml(+27 -0)📄 Description
Pull Request Checklist
devruff>=0.15.5as dev dependency. Ruff is the standard Python linter/formatter used by FastAPI, Pydantic, Hugging Face, etc.ruff check backendandruff format --check backendlocallydevfeatChangelog Entry
Description
black-based workflow. Ref: #21641, https://github.com/open-webui/open-webui/discussions/22462Added
[tool.ruff]configuration inpyproject.tomlwith base rule set (E,F,W,I,UP,C90,Q,ICN), single quotes,line-length = 120ruff>=0.15.5dev dependency.pre-commit-config.yaml) — runsruff check --fixandruff formatonbackend/.github/workflows/ruff.yml) — runs lint & format checks on PRsChanged
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
B,SIM,PERF,RUF, etc.) will be added incrementally in follow-up PRs after fixing existing violations.Screenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.