mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #4597] [MERGED] refactor: search and replace-able cleanup #8314
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/4597
Author: @michaelpoluektov
Created: 8/14/2024
Status: ✅ Merged
Merged: 8/14/2024
Merged by: @tjbck
Base:
dev← Head:cleanup📝 Commits (5)
6f72defreplace except: with except Exception:038fc48replace == None with is None29f904dremove List importsa518d50format backend0470146replace Tuple with tuple📊 Changes
42 files changed (+215 additions, -214 deletions)
View changed files
📝
backend/apps/audio/main.py(+7 -7)📝
backend/apps/images/main.py(+4 -4)📝
backend/apps/ollama/main.py(+6 -6)📝
backend/apps/openai/main.py(+3 -3)📝
backend/apps/rag/main.py(+8 -8)📝
backend/apps/rag/search/brave.py(+2 -2)📝
backend/apps/rag/search/duckduckgo.py(+3 -3)📝
backend/apps/rag/search/google_pse.py(+2 -2)📝
backend/apps/rag/search/jina_search.py(+1 -1)📝
backend/apps/rag/search/searxng.py(+5 -5)📝
backend/apps/rag/search/serper.py(+2 -2)📝
backend/apps/rag/search/serply.py(+2 -2)📝
backend/apps/rag/search/serpstack.py(+2 -2)📝
backend/apps/rag/search/tavily.py(+1 -1)📝
backend/apps/rag/utils.py(+6 -6)📝
backend/apps/webui/models/auths.py(+6 -6)📝
backend/apps/webui/models/chats.py(+20 -20)📝
backend/apps/webui/models/documents.py(+5 -5)📝
backend/apps/webui/models/files.py(+5 -5)📝
backend/apps/webui/models/functions.py(+10 -10)...and 22 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
A few runs of search and replace for best practices in Python, namely:
except:withexcept Exception:to prevent from catchingKeyboardInterrupt== Nonewithis Noneas per convention (gives linter warning)typing.Listwithlistandtyping.Tuplewithtupleas the backend was never intended to run on Python < 3.9 and builtinlistandtupleare convention in newer version of Python.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.