Skip to content

Commit 0663589

Browse files
committed
refac
1 parent 0ded0b7 commit 0663589

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

backend/open_webui/constants.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class MESSAGES(str, Enum):
99

1010
class WEBHOOK_MESSAGES(str, Enum):
1111
DEFAULT = lambda msg='': f'{msg if msg else ""}'
12-
USER_SIGNUP = lambda username='': (f'New user signed up: {username}' if username else 'New user signed up')
12+
USER_SIGNUP = lambda username='': f'New user signed up: {username}' if username else 'New user signed up'
1313

1414

1515
class ERROR_MESSAGES(str, Enum):
@@ -80,16 +80,16 @@ def __str__(self) -> str:
8080

8181
OLLAMA_API_DISABLED = 'The Ollama API is disabled. Please enable it to use this feature.'
8282

83-
FILE_TOO_LARGE = (
84-
lambda size='': f"Oops! The file you're trying to upload is too large. Please upload a file that is less than {size}."
83+
FILE_TOO_LARGE = lambda size='': (
84+
f"Oops! The file you're trying to upload is too large. Please upload a file that is less than {size}."
8585
)
8686

8787
DUPLICATE_CONTENT = 'Duplicate content detected. Please provide unique content to proceed.'
8888
FILE_NOT_PROCESSED = (
8989
'Extracted content is not available for this file. Please ensure that the file is processed before proceeding.'
9090
)
9191

92-
INVALID_PASSWORD = lambda err='': (err if err else 'The password does not meet the required validation criteria.')
92+
INVALID_PASSWORD = lambda err='': err if err else 'The password does not meet the required validation criteria.'
9393

9494

9595
class TASKS(str, Enum):

backend/open_webui/utils/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def start_logger():
150150
"""
151151
logger.remove()
152152

153-
audit_filter = lambda record: (True if ENABLE_AUDIT_STDOUT else 'auditable' not in record['extra'])
153+
audit_filter = lambda record: True if ENABLE_AUDIT_STDOUT else 'auditable' not in record['extra']
154154
if LOG_FORMAT == 'json':
155155
logger.add(
156156
_json_sink,

0 commit comments

Comments
 (0)