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:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
A few runs of search and replace for best practices in Python, namely:
replace except: with except Exception: to prevent from catching KeyboardInterrupt
replace == None with is None as per convention (gives linter warning)
replace typing.List with list and typing.Tuple with tuple as the backend was never intended to run on Python < 3.9 and builtin list and tuple are convention in newer version of Python.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/4597
**Author:** [@michaelpoluektov](https://github.com/michaelpoluektov)
**Created:** 8/14/2024
**Status:** ✅ Merged
**Merged:** 8/14/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `cleanup`
---
### 📝 Commits (5)
- [`6f72def`](https://github.com/open-webui/open-webui/commit/6f72def1ac780c3202587269a52efe4f9cb145c5) replace except: with except Exception:
- [`038fc48`](https://github.com/open-webui/open-webui/commit/038fc48ac0dd50e0ec5483809e15b316e8806e12) replace == None with is None
- [`29f904d`](https://github.com/open-webui/open-webui/commit/29f904db453bfa045d226a0f96afadd2a45d5c1e) remove List imports
- [`a518d50`](https://github.com/open-webui/open-webui/commit/a518d50477382d234adf643acb6ead26272e195f) format backend
- [`0470146`](https://github.com/open-webui/open-webui/commit/0470146d7b09a9d907bf358b65b7839823c8f946) replace Tuple with tuple
### 📊 Changes
**42 files changed** (+215 additions, -214 deletions)
<details>
<summary>View changed files</summary>
📝 `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_
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests for validating the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
A few runs of search and replace for best practices in Python, namely:
- replace `except:` with `except Exception:` to prevent from catching `KeyboardInterrupt`
- replace `== None` with `is None` as per convention (gives linter warning)
- replace `typing.List` with `list` and `typing.Tuple` with `tuple` as the backend was never intended to run on Python < 3.9 and builtin `list` and `tuple` are convention in newer version of Python.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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.