Fixed linting

This commit is contained in:
Saifeddine ALOUI
2025-02-20 11:38:07 +01:00
parent 3f3e9ef367
commit 167fa82363
3 changed files with 86 additions and 56 deletions

View File

@@ -579,39 +579,38 @@ class DocumentManager:
".docx", ".docx",
".pptx", ".pptx",
".xlsx", ".xlsx",
".rtf", # Rich Text Format ".rtf", # Rich Text Format
".odt", # OpenDocument Text ".odt", # OpenDocument Text
".tex", # LaTeX ".tex", # LaTeX
".epub", # Electronic Publication ".epub", # Electronic Publication
".html", # HyperText Markup Language ".html", # HyperText Markup Language
".htm", # HyperText Markup Language ".htm", # HyperText Markup Language
".csv", # Comma-Separated Values ".csv", # Comma-Separated Values
".json", # JavaScript Object Notation ".json", # JavaScript Object Notation
".xml", # eXtensible Markup Language ".xml", # eXtensible Markup Language
".yaml", # YAML Ain't Markup Language ".yaml", # YAML Ain't Markup Language
".yml", # YAML ".yml", # YAML
".log", # Log files ".log", # Log files
".conf", # Configuration files ".conf", # Configuration files
".ini", # Initialization files ".ini", # Initialization files
".properties",# Java properties files ".properties", # Java properties files
".sql", # SQL scripts ".sql", # SQL scripts
".bat", # Batch files ".bat", # Batch files
".sh", # Shell scripts ".sh", # Shell scripts
".c", # C source code ".c", # C source code
".cpp", # C++ source code ".cpp", # C++ source code
".py", # Python source code ".py", # Python source code
".java", # Java source code ".java", # Java source code
".js", # JavaScript source code ".js", # JavaScript source code
".ts", # TypeScript source code ".ts", # TypeScript source code
".swift", # Swift source code ".swift", # Swift source code
".go", # Go source code ".go", # Go source code
".rb", # Ruby source code ".rb", # Ruby source code
".php", # PHP source code ".php", # PHP source code
".css", # Cascading Style Sheets ".css", # Cascading Style Sheets
".scss", # Sassy CSS ".scss", # Sassy CSS
".less", # LESS CSS ".less", # LESS CSS
) ),
): ):
self.input_dir = Path(input_dir) self.input_dir = Path(input_dir)
self.supported_extensions = supported_extensions self.supported_extensions = supported_extensions
@@ -1180,10 +1179,41 @@ def create_app(args):
# Process based on file type # Process based on file type
match ext: match ext:
case ".txt" | ".md" | ".html" | ".htm" | ".tex" | ".json" | ".xml" | ".yaml" | ".yml" | \ case (
".rtf" | ".odt" | ".epub" | ".csv" | ".log" | ".conf" | ".ini" | ".properties" | \ ".txt"
".sql" | ".bat" | ".sh" | ".c" | ".cpp" | ".py" | ".java" | ".js" | ".ts" | \ | ".md"
".swift" | ".go" | ".rb" | ".php" | ".css" | ".scss" | ".less": | ".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") content = file.decode("utf-8")
case ".pdf": case ".pdf":

View File

@@ -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,`; margin-right: `).concat(u,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
} }
.`).concat(af,` { .`).concat(af,` {
right: `).concat(u,"px ").concat(r,`; right: `).concat(u,"px ").concat(r,`;
} }
.`).concat(of,` { .`).concat(of,` {
margin-right: `).concat(u,"px ").concat(r,`; margin-right: `).concat(u,"px ").concat(r,`;
} }
.`).concat(af," .").concat(af,` { .`).concat(af," .").concat(af,` {
right: 0 `).concat(r,`; right: 0 `).concat(r,`;
} }
.`).concat(of," .").concat(of,` { .`).concat(of," .").concat(of,` {
margin-right: 0 `).concat(r,`; margin-right: 0 `).concat(r,`;
} }
body[`).concat(tl,`] { body[`).concat(tl,`] {
`).concat(UP,": ").concat(u,`px; `).concat(UP,": ").concat(u,`px;
} }
@@ -697,7 +697,7 @@ void main() {
vec2 sourceCompensationVector = vec2 sourceCompensationVector =
vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x) vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x)
* (webGLSourceRadius + webGLSourceArrowHeadLength); * (webGLSourceRadius + webGLSourceArrowHeadLength);
// Target arrow head // Target arrow head
float targetRadius = a_targetRadius * a_targetRadiusCoef; float targetRadius = a_targetRadius * a_targetRadiusCoef;
float targetDirection = sign(targetRadius); float targetDirection = sign(targetRadius);
@@ -1004,7 +1004,7 @@ void main() {
position = viewportToClipspace(viewportOffsetPosition, u_dimensions); position = viewportToClipspace(viewportOffsetPosition, u_dimensions);
gl_Position = vec4(position, 0, 1); gl_Position = vec4(position, 0, 1);
`).concat(n?` `).concat(n?`
v_targetSize = a_targetSize * u_pixelRatio / u_sizeRatio; v_targetSize = a_targetSize * u_pixelRatio / u_sizeRatio;
v_targetPoint = viewportTarget; v_targetPoint = viewportTarget;

View File

@@ -1,14 +1,14 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./vite.svg" /> <link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lightrag</title> <title>Lightrag</title>
<script type="module" crossorigin src="./assets/index-BDX8o1Ld.js"></script> <script type="module" crossorigin src="./assets/index-BDX8o1Ld.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CLsJV-0i.css"> <link rel="stylesheet" crossorigin href="./assets/index-CLsJV-0i.css">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
</body>
</body> </html>