From 167fa823630376fba15e5179dc59ec1f6d1465bd Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Thu, 20 Feb 2025 11:38:07 +0100 Subject: [PATCH] Fixed linting --- lightrag/api/lightrag_server.py | 104 +++++++++++++------- lightrag/api/webui/assets/index-BDX8o1Ld.js | 14 +-- lightrag/api/webui/index.html | 24 ++--- 3 files changed, 86 insertions(+), 56 deletions(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 306c9816..87068db6 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -579,39 +579,38 @@ class DocumentManager: ".docx", ".pptx", ".xlsx", - ".rtf", # Rich Text Format - ".odt", # OpenDocument Text - ".tex", # LaTeX - ".epub", # Electronic Publication - ".html", # HyperText Markup Language - ".htm", # HyperText Markup Language - ".csv", # Comma-Separated Values - ".json", # JavaScript Object Notation - ".xml", # eXtensible Markup Language - ".yaml", # YAML Ain't Markup Language - ".yml", # YAML - ".log", # Log files - ".conf", # Configuration files - ".ini", # Initialization files - ".properties",# Java properties files - ".sql", # SQL scripts - ".bat", # Batch files - ".sh", # Shell scripts - ".c", # C source code - ".cpp", # C++ source code - ".py", # Python source code - ".java", # Java source code - ".js", # JavaScript source code - ".ts", # TypeScript source code - ".swift", # Swift source code - ".go", # Go source code - ".rb", # Ruby source code - ".php", # PHP source code - ".css", # Cascading Style Sheets - ".scss", # Sassy CSS - ".less", # LESS CSS - ) - + ".rtf", # Rich Text Format + ".odt", # OpenDocument Text + ".tex", # LaTeX + ".epub", # Electronic Publication + ".html", # HyperText Markup Language + ".htm", # HyperText Markup Language + ".csv", # Comma-Separated Values + ".json", # JavaScript Object Notation + ".xml", # eXtensible Markup Language + ".yaml", # YAML Ain't Markup Language + ".yml", # YAML + ".log", # Log files + ".conf", # Configuration files + ".ini", # Initialization files + ".properties", # Java properties files + ".sql", # SQL scripts + ".bat", # Batch files + ".sh", # Shell scripts + ".c", # C source code + ".cpp", # C++ source code + ".py", # Python source code + ".java", # Java source code + ".js", # JavaScript source code + ".ts", # TypeScript source code + ".swift", # Swift source code + ".go", # Go source code + ".rb", # Ruby source code + ".php", # PHP source code + ".css", # Cascading Style Sheets + ".scss", # Sassy CSS + ".less", # LESS CSS + ), ): self.input_dir = Path(input_dir) self.supported_extensions = supported_extensions @@ -1180,10 +1179,41 @@ def create_app(args): # Process based on file type match ext: - case ".txt" | ".md" | ".html" | ".htm" | ".tex" | ".json" | ".xml" | ".yaml" | ".yml" | \ - ".rtf" | ".odt" | ".epub" | ".csv" | ".log" | ".conf" | ".ini" | ".properties" | \ - ".sql" | ".bat" | ".sh" | ".c" | ".cpp" | ".py" | ".java" | ".js" | ".ts" | \ - ".swift" | ".go" | ".rb" | ".php" | ".css" | ".scss" | ".less": + case ( + ".txt" + | ".md" + | ".html" + | ".htm" + | ".tex" + | ".json" + | ".xml" + | ".yaml" + | ".yml" + | ".rtf" + | ".odt" + | ".epub" + | ".csv" + | ".log" + | ".conf" + | ".ini" + | ".properties" + | ".sql" + | ".bat" + | ".sh" + | ".c" + | ".cpp" + | ".py" + | ".java" + | ".js" + | ".ts" + | ".swift" + | ".go" + | ".rb" + | ".php" + | ".css" + | ".scss" + | ".less" + ): content = file.decode("utf-8") case ".pdf": diff --git a/lightrag/api/webui/assets/index-BDX8o1Ld.js b/lightrag/api/webui/assets/index-BDX8o1Ld.js index f0435775..12290b22 100644 --- a/lightrag/api/webui/assets/index-BDX8o1Ld.js +++ b/lightrag/api/webui/assets/index-BDX8o1Ld.js @@ -231,23 +231,23 @@ ${(t=e.config)==null?void 0:t.url}`):e});const nM=async e=>(await Nr.get(`/graph margin-right: `).concat(u,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` } - + .`).concat(af,` { right: `).concat(u,"px ").concat(r,`; } - + .`).concat(of,` { margin-right: `).concat(u,"px ").concat(r,`; } - + .`).concat(af," .").concat(af,` { right: 0 `).concat(r,`; } - + .`).concat(of," .").concat(of,` { margin-right: 0 `).concat(r,`; } - + body[`).concat(tl,`] { `).concat(UP,": ").concat(u,`px; } @@ -697,7 +697,7 @@ void main() { vec2 sourceCompensationVector = vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x) * (webGLSourceRadius + webGLSourceArrowHeadLength); - + // Target arrow head float targetRadius = a_targetRadius * a_targetRadiusCoef; float targetDirection = sign(targetRadius); @@ -1004,7 +1004,7 @@ void main() { position = viewportToClipspace(viewportOffsetPosition, u_dimensions); gl_Position = vec4(position, 0, 1); - + `).concat(n?` v_targetSize = a_targetSize * u_pixelRatio / u_sizeRatio; v_targetPoint = viewportTarget; diff --git a/lightrag/api/webui/index.html b/lightrag/api/webui/index.html index 3bad064d..b3fb7d00 100644 --- a/lightrag/api/webui/index.html +++ b/lightrag/api/webui/index.html @@ -1,14 +1,14 @@ - - - - - - - Lightrag + + + + + + + Lightrag - - -
- - + + +
+ +