(lint) ruff fix

This commit is contained in:
ManishMadan2882
2025-08-05 15:37:39 +05:30
parent 1eb011e8c3
commit 1356d71839
5 changed files with 5 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import logging
import traceback
from flask import make_response, request, Response
from flask import request, Response
from flask_restx import fields, Resource
from application.api import api

View File

@@ -55,7 +55,7 @@ def upload_index_files():
if directory_structure:
try:
directory_structure = json.loads(directory_structure)
except:
except Exception:
logger.error("Error parsing directory_structure")
directory_structure = {}
else:

View File

@@ -3,7 +3,6 @@ import json
import math
import os
import secrets
import shutil
import uuid
from functools import wraps
from typing import Optional, Tuple
@@ -735,7 +734,7 @@ class ManageSourceFiles(Resource):
try:
file_paths = json.loads(file_paths_str) if isinstance(file_paths_str, str) else file_paths_str
except:
except Exception:
return make_response(
jsonify({"success": False, "message": "Invalid file_paths format"}), 400
)

View File

@@ -197,7 +197,7 @@ class SimpleDirectoryReader(BaseReader):
# Build directory structure if input_dir is provided
if hasattr(self, 'input_dir'):
self.directory_structure = self.build_directory_structure(self.input_dir)
logging.info(f"Directory structure built successfully")
logging.info("Directory structure built successfully")
else:
self.directory_structure = {}

View File

@@ -136,5 +136,5 @@ class LocalStorage(BaseStorage):
try:
shutil.rmtree(full_path)
return True
except (OSError, PermissionError) as e:
except (OSError, PermissionError):
return False