From a3311df27c6c4e85eb310e9aa5f97f5dab3ff392 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 21 Jan 2025 00:10:52 +0100 Subject: [PATCH] fixed linting --- extra/OpenWebuiTool/openwebui_tool.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/extra/OpenWebuiTool/openwebui_tool.py b/extra/OpenWebuiTool/openwebui_tool.py index 8737a2ed..8df3109c 100644 --- a/extra/OpenWebuiTool/openwebui_tool.py +++ b/extra/OpenWebuiTool/openwebui_tool.py @@ -30,11 +30,8 @@ __author_email__ = "parisneoai@gmail.com" __description__ = "Lightrag integration for OpenWebui" -import os import requests import json -import csv -from io import StringIO from pydantic import BaseModel, Field from typing import Callable, Any, Literal, Union, List, Tuple @@ -238,7 +235,7 @@ class Tools: remaining = remaining[index + 3 :] first_index += index + 3 bloc_index += 1 - except Exception as ex: + except Exception: if bloc_index % 2 == 1: index = len(remaining) indices.append(index) @@ -293,11 +290,11 @@ class Tools: if len(sub_text) > 0: try: find_space = sub_text.index(" ") - except: + except Exception: find_space = int(1e10) try: find_return = sub_text.index("\n") - except: + except Exception: find_return = int(1e10) next_index = min(find_return, find_space) if "{" in sub_text[:next_index]: