Skip to content

Commit 701bd84

Browse files
committed
fix pre-commit issues
1 parent 262a1ed commit 701bd84

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

camel/benchmarks/browsecomp.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class QueryResponse(BaseModel):
5555
)
5656
exact_answer: str = Field(description="""your succinct, final answer.""")
5757
confidence: str = Field(
58-
description="""
58+
description=r"""
5959
your confidence score between 0|\%| and 100|\%| for your answer.
6060
"""
6161
)
@@ -92,7 +92,7 @@ class GradingResponse(BaseModel):
9292
incorrect."""
9393
)
9494
confidence: str = Field(
95-
description="""The extracted confidence score between 0|\%|
95+
description=r"""The extracted confidence score between 0|\%|
9696
and 100|\%| from [response]. Put 100 if there is no confidence score available.
9797
"""
9898
)
@@ -160,8 +160,8 @@ class EvalResult(BaseModel):
160160
{content}
161161
"""
162162

163-
GRADER_TEMPLATE = """
164-
Judge whether the following [response] to [question] is correct or not
163+
GRADER_TEMPLATE = r"""
164+
Judge whether the following [response] to [question] is correct or not
165165
based on the precise and unambiguous [correct_answer] below.
166166
167167
[question]: {question}
@@ -171,26 +171,26 @@ class EvalResult(BaseModel):
171171
Your judgement must be in the format and criteria specified below:
172172
173173
extracted_final_answer: The final exact answer extracted from the [response].
174-
Put the extracted answer as 'None' if there is no exact, final answer to
174+
Put the extracted answer as 'None' if there is no exact, final answer to
175175
extract from the response.
176176
177177
[correct_answer]: {correct_answer}
178178
179-
reasoning: Explain why the extracted_final_answer is correct or incorrect
180-
based on [correct_answer], focusing only on if there are meaningful
181-
differences between [correct_answer] and the extracted_final_answer.
182-
Do not comment on any background to the problem, do not attempt
183-
to solve the problem, do not argue for any answer different
179+
reasoning: Explain why the extracted_final_answer is correct or incorrect
180+
based on [correct_answer], focusing only on if there are meaningful
181+
differences between [correct_answer] and the extracted_final_answer.
182+
Do not comment on any background to the problem, do not attempt
183+
to solve the problem, do not argue for any answer different
184184
than [correct_answer], focus only on whether the answers match.
185185
186-
correct: Answer 'yes' if extracted_final_answer matches the
187-
[correct_answer] given above, or is within a small margin of error for
188-
numerical problems. Answer 'no' otherwise, i.e. if there is any
189-
inconsistency, ambiguity, non-equivalency, or if the extracted answer is
186+
correct: Answer 'yes' if extracted_final_answer matches the
187+
[correct_answer] given above, or is within a small margin of error for
188+
numerical problems. Answer 'no' otherwise, i.e. if there is any
189+
inconsistency, ambiguity, non-equivalency, or if the extracted answer is
190190
incorrect.
191191
192192
193-
confidence: The extracted confidence score between 0|\%| and 100|\%|
193+
confidence: The extracted confidence score between 0|\%| and 100|\%|
194194
from [response]. Put 100 if there is no confidence score available.
195195
""".strip()
196196

camel/storages/vectordb_storages/qdrant.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def update_payload(
309309
op_info = self._client.set_payload(
310310
collection_name=self.collection_name,
311311
payload=payload,
312-
points=PointIdsList(points=points),
312+
points=PointIdsList(points=points), # type: ignore[arg-type]
313313
**kwargs,
314314
)
315315
if op_info.status != UpdateStatus.COMPLETED:
@@ -376,7 +376,7 @@ def delete(
376376
op_info = self._client.delete(
377377
collection_name=self.collection_name,
378378
points_selector=PointIdsList(
379-
points=cast(List[Union[int, str, UUID]], ids)
379+
points=cast(List[Union[int, str, UUID]], ids) # type: ignore[arg-type]
380380
),
381381
**kwargs,
382382
)

camel/storages/vectordb_storages/tidb.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _create_client(
107107
)
108108

109109
def _get_table_model(self, collection_name: str) -> Any:
110-
from pytidb.datatype import JSON
110+
from pytidb.datatype import JSON # type: ignore[import-not-found]
111111
from pytidb.schema import Field, TableModel, VectorField
112112

113113
class VectorDBRecordBase(TableModel, table=False):
@@ -130,7 +130,8 @@ def _open_and_create_table(self) -> "Table[Any]":
130130
if table is None:
131131
table_model = self._get_table_model(self.collection_name)
132132
table = self._client.create_table(
133-
schema=table_model, if_exists="skip"
133+
schema=table_model,
134+
if_exists="skip", # type: ignore[call-arg]
134135
)
135136
return table
136137

0 commit comments

Comments
 (0)