Skip to content

Commit aa53fe2

Browse files
committed
style: apply ruff formatting fixes
1 parent cf0be4f commit aa53fe2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dspy/teleprompt/gepa/gepa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def feedback_fn(
533533
if self.optimize_tool_descriptions:
534534
tool_descriptions = {}
535535
for _, module in student.named_sub_modules():
536-
if hasattr(module, 'tools'):
536+
if hasattr(module, "tools"):
537537
for tool_name, tool in module.tools.items():
538538
tool_key = f"tool:{tool_name}"
539539
if tool_key not in tool_descriptions:

dspy/teleprompt/gepa/gepa_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ def build_program(self, candidate: dict[str, str]):
126126
for name, pred in new_prog.named_predictors():
127127
if name in candidate:
128128
pred.signature = pred.signature.with_instructions(candidate[name])
129-
129+
130130
if self.optimize_tool_descriptions:
131131
for _, module in new_prog.named_sub_modules():
132-
if hasattr(module, 'tools'):
132+
if hasattr(module, "tools"):
133133
for tool_name, tool in module.tools.items():
134134
tool_key = f"tool:{tool_name}"
135135
if tool_key in candidate:
136136
tool.desc = candidate[tool_key]
137-
137+
138138
return new_prog
139139

140140
def evaluate(self, batch, candidate, capture_traces=False):

0 commit comments

Comments
 (0)