Skip to content

Commit 9d6bbff

Browse files
committed
minor update
1 parent cdd5ea7 commit 9d6bbff

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

camel/benchmarks/gaia.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from pathlib import Path
2323
from typing import Any, Dict, List, Literal, Optional, Protocol, Union
2424

25-
import pandas as pd
2625
from tqdm import tqdm
2726

2827
from camel.agents import ChatAgent
@@ -166,6 +165,8 @@ def load(self, force_download=False):
166165
force_download (bool, optional): Whether to
167166
force download the data.
168167
"""
168+
import pandas as pd
169+
169170
if force_download:
170171
logger.info("Force downloading data.")
171172
self.download()

camel/toolkits/pptx_toolkit.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,8 @@ def _handle_step_by_step_process(
680680
slide_width_inch (float): The width of the slide in inches.
681681
slide_height_inch (float): The height of the slide in inches.
682682
"""
683-
import pptx
684683
from pptx.enum.shapes import MSO_AUTO_SHAPE_TYPE
684+
from pptx.enum.text import MSO_ANCHOR, PP_ALIGN
685685
from pptx.util import Inches, Pt
686686

687687
steps = slide_json['bullet_points']
@@ -710,8 +710,8 @@ def _handle_step_by_step_process(
710710
text_frame = shape.text_frame
711711
text_frame.clear()
712712
paragraph = text_frame.paragraphs[0]
713-
paragraph.alignment = pptx.enum.text.PP_ALIGN.CENTER
714-
text_frame.vertical_anchor = pptx.enum.text.MSO_ANCHOR.MIDDLE
713+
paragraph.alignment = PP_ALIGN.CENTER
714+
text_frame.vertical_anchor = MSO_ANCHOR.MIDDLE
715715
self._format_text(
716716
paragraph, step.removeprefix(STEP_BY_STEP_PROCESS_MARKER)
717717
)
@@ -732,8 +732,8 @@ def _handle_step_by_step_process(
732732
text_frame = shape.text_frame
733733
text_frame.clear()
734734
paragraph = text_frame.paragraphs[0]
735-
paragraph.alignment = pptx.enum.text.PP_ALIGN.CENTER
736-
text_frame.vertical_anchor = pptx.enum.text.MSO_ANCHOR.MIDDLE
735+
paragraph.alignment = PP_ALIGN.CENTER
736+
text_frame.vertical_anchor = MSO_ANCHOR.MIDDLE
737737
self._format_text(
738738
paragraph, step.removeprefix(STEP_BY_STEP_PROCESS_MARKER)
739739
)

camel/toolkits/resend_toolkit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# limitations under the License.
1313
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
1414

15-
from typing import Dict, List, Optional, cast
15+
from typing import Dict, List, Optional
1616

1717
from camel.toolkits.base import BaseToolkit
1818
from camel.toolkits.function_tool import FunctionTool
@@ -141,7 +141,7 @@ def send_email(
141141
if reply_to:
142142
params["reply_to"] = reply_to
143143
if tags:
144-
params["tags"] = cast('list[resend.emails._tag.Tag]', tags)
144+
params["tags"] = tags # type: ignore[typeddict-item]
145145
if headers:
146146
params["headers"] = headers
147147

0 commit comments

Comments
 (0)