Refactor: reformat all code for lefthook using ruff and gofmt (#16585)

This commit is contained in:
Wang Qi
2026-07-03 12:53:39 +08:00
committed by GitHub
parent 19fcb4a981
commit 6a4b9be426
588 changed files with 11123 additions and 15412 deletions

View File

@@ -42,7 +42,7 @@ class RAGFlowExcelParser:
try:
file_like_object.seek(0)
df = pd.read_csv(file_like_object, on_bad_lines='skip')
df = pd.read_csv(file_like_object, on_bad_lines="skip")
return RAGFlowExcelParser._dataframe_to_workbook(df)
except Exception as e_csv:
@@ -261,7 +261,7 @@ class RAGFlowExcelParser:
except Exception as e:
logging.warning(f"Parse spreadsheet error: {e}, trying to interpret as CSV file")
file_like_object.seek(0)
df = pd.read_csv(file_like_object, on_bad_lines='skip')
df = pd.read_csv(file_like_object, on_bad_lines="skip")
df = df.replace(r"^\s*$", "", regex=True)
return df.to_markdown(index=False)