mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #2816] [CLOSED] chore: Fix some PEP issues in the backend #21110
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/2816
Author: @franciscovelez
Created: 6/4/2024
Status: ❌ Closed
Base:
dev← Head:fix-some-pep📝 Commits (5)
71c40e3remove unused imported modulesca608b2fix comparisons toNonewhich are not using theisoperatorbcc7304Fix duplicated names1b6d459Remove unused vars8ce54ddMore linting things📊 Changes
31 files changed (+85 additions, -158 deletions)
View changed files
📝
backend/apps/audio/main.py(+2 -6)📝
backend/apps/images/main.py(+8 -14)📝
backend/apps/images/utils/comfyui.py(+0 -1)📝
backend/apps/ollama/main.py(+14 -21)📝
backend/apps/openai/main.py(+3 -5)📝
backend/apps/rag/main.py(+6 -6)📝
backend/apps/rag/search/google_pse.py(+0 -1)📝
backend/apps/rag/search/serpstack.py(+0 -1)📝
backend/apps/webui/main.py(+1 -3)📝
backend/apps/webui/models/auths.py(+1 -2)📝
backend/apps/webui/models/chats.py(+1 -1)📝
backend/apps/webui/models/documents.py(+1 -3)📝
backend/apps/webui/models/memories.py(+1 -2)📝
backend/apps/webui/models/models.py(+1 -3)📝
backend/apps/webui/models/prompts.py(+1 -4)📝
backend/apps/webui/models/tags.py(+4 -5)📝
backend/apps/webui/models/users.py(+1 -2)📝
backend/apps/webui/routers/auths.py(+2 -4)📝
backend/apps/webui/routers/chats.py(+4 -9)📝
backend/apps/webui/routers/configs.py(+3 -11)...and 11 more files
📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
I have been checking some PEP style issues in the backend code finding a lot of unused imports & vars and other more severe things like duplicated function names in the same file. This changes does not affect to the performance or application behaviour however, I think will provide a cleaner code.
Removed
Changed
==or!=instead ofisoris notFixed
get_image_size,update_image_size,get_user_chatsandget_app_config) on some files🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.