From 30399411fd61297c1f5f6f146be1ffb474dca05a Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:05:57 +0000 Subject: [PATCH] style: format code with Autopep8 This commit fixes the style issues introduced in 76a575a according to the output from Autopep8. Details: None --- python/openwebui/pipe_mcts.py | 9 ++++++--- python/rclone_check_notify.py | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python/openwebui/pipe_mcts.py b/python/openwebui/pipe_mcts.py index c3a05e9..3cb761d 100644 --- a/python/openwebui/pipe_mcts.py +++ b/python/openwebui/pipe_mcts.py @@ -200,7 +200,8 @@ def get_chunk_content(self, chunk): if "content" in delta: yield delta["content"] except json.JSONDecodeError: - logger.error('ChunkDecodeError: unable to parse "%s"', chunk_str[:100]) + logger.error('ChunkDecodeError: unable to parse "%s"', + chunk_str[:100]) class Node: @@ -473,7 +474,8 @@ async def evaluate_answer(self, answer: str): score = int(re.search(r"\d+", result).group()) return score except Exception as e: - logger.error("Failed to parse score from result: %s - %s", result, e) + logger.error( + "Failed to parse score from result: %s - %s", result, e) return 0 async def generate_completion(self, prompt: str): @@ -715,7 +717,8 @@ async def pipe( if match: backend, model_name = match.groups() else: - logger.error("Model ID should be in the format '*.mcts/backend/model_name'") + logger.error( + "Model ID should be in the format '*.mcts/backend/model_name'") logger.error("Invalid model ID: %s", model_id) return "" diff --git a/python/rclone_check_notify.py b/python/rclone_check_notify.py index 0ca16b8..ffcbf8d 100644 --- a/python/rclone_check_notify.py +++ b/python/rclone_check_notify.py @@ -43,7 +43,8 @@ def send_notification(title, message, priority): def run_command(command): try: # Run the command - result = subprocess.run(command, capture_output=True, text=True, shell=True) + result = subprocess.run( + command, capture_output=True, text=True, shell=True) # Return the output or error based on the execution result if result.returncode == 0: