fixed linting

This commit is contained in:
Saifeddine ALOUI
2025-01-27 02:10:24 +01:00
parent a68aebb124
commit f307ed43f5
3 changed files with 16 additions and 15 deletions

View File

@@ -1791,7 +1791,7 @@ def create_app(args):
raise HTTPException(status_code=500, detail=str(e)) raise HTTPException(status_code=500, detail=str(e))
@app.get("/documents", dependencies=[Depends(optional_api_key)]) @app.get("/documents", dependencies=[Depends(optional_api_key)])
async def get_status(): async def documents():
"""Get current system status""" """Get current system status"""
return doc_manager.indexed_files return doc_manager.indexed_files
@@ -1831,7 +1831,7 @@ def create_app(args):
# ) # )
# Serve the static files # Serve the static files
static_dir = Path(__file__).parent / "static" static_dir = Path(__file__).parent / "static"
static_dir.mkdir(exist_ok=True) static_dir.mkdir(exist_ok=True)
app.mount("/", StaticFiles(directory=static_dir, html=True), name="static") app.mount("/", StaticFiles(directory=static_dir, html=True), name="static")

View File

@@ -340,7 +340,6 @@ class Neo4JStorage(BaseGraphStorage):
async def _node2vec_embed(self): async def _node2vec_embed(self):
print("Implemented but never called.") print("Implemented but never called.")
async def get_knowledge_graph( async def get_knowledge_graph(
self, node_label: str, max_depth: int = 5 self, node_label: str, max_depth: int = 5
) -> Dict[str, List[Dict]]: ) -> Dict[str, List[Dict]]:
@@ -448,7 +447,9 @@ class Neo4JStorage(BaseGraphStorage):
# Add node data (with complete labels) # Add node data (with complete labels)
node_data = {k: v for k, v in node.items()} node_data = {k: v for k, v in node.items()}
node_data["labels"] = [current_label] # Assume get_node method returns label information node_data["labels"] = [
current_label
] # Assume get_node method returns label information
result["nodes"].append(node_data) result["nodes"].append(node_data)
# Get all outgoing and incoming edges # Get all outgoing and incoming edges