Fix lint errors in ExcelProcessor and Message components
This commit is contained in:
parent
204a0e2793
commit
7f3daf86ce
2 changed files with 2 additions and 5 deletions
|
|
@ -21,13 +21,10 @@ A component for reading, processing, and generating Excel files in RAGFlow agent
|
||||||
Supports multiple Excel file inputs, data transformation, and Excel output generation.
|
Supports multiple Excel file inputs, data transformation, and Excel output generation.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
from functools import partial
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
|
|
@ -319,7 +316,7 @@ class ExcelProcessor(ComponentBase, ABC):
|
||||||
self.set_output("data", {"raw": str(data)})
|
self.set_output("data", {"raw": str(data)})
|
||||||
self.set_output("markdown", str(data))
|
self.set_output("markdown", str(data))
|
||||||
|
|
||||||
self.set_output("summary", f"Transformed data ready for processing")
|
self.set_output("summary", "Transformed data ready for processing")
|
||||||
|
|
||||||
def _output_excel(self):
|
def _output_excel(self):
|
||||||
"""Generate Excel file output from data."""
|
"""Generate Excel file output from data."""
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ class Message(ComponentBase):
|
||||||
elif self._param.output_format == "xlsx":
|
elif self._param.output_format == "xlsx":
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import re
|
|
||||||
|
|
||||||
# Try to parse markdown table from the content
|
# Try to parse markdown table from the content
|
||||||
df = None
|
df = None
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue