Skip to content

Commit 457cd88

Browse files
rakesh-uipathclaude
andcommitted
style: fix ruff formatting violations in eval packages
Ruff format check was failing CI for uipath and uipath-eval packages. Applied auto-format to 4 source files and 2 test files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d0c7704 commit 457cd88

6 files changed

Lines changed: 17 additions & 9 deletions

File tree

packages/uipath-eval/src/uipath_eval/_helpers/evaluators_helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"!=": "ne",
2222
}
2323

24+
2425
def extract_tool_calls_names(spans: Sequence[ReadableSpan]) -> list[str]:
2526
"""Extract the tool call names from execution spans IN ORDER.
2627

packages/uipath-eval/src/uipath_eval/evaluators/base_legacy_evaluator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
__all__ = ["track_evaluation_metrics"]
2222

23+
2324
# Legacy evaluator config (non-generic version for simplicity)
2425
class LegacyEvaluatorConfig(BaseEvaluatorConfig[BaseEvaluationCriteria]):
2526
"""Configuration for legacy evaluators."""

packages/uipath/src/uipath/eval/evaluators/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848

4949
EVALUATORS: list[type[BaseEvaluator[Any, Any, Any]]] = [
5050
# Replace uipath_eval.ExactMatchEvaluator with local version (has attachment support)
51-
*(e for e in _EVAL_EVALUATORS if e.get_evaluator_id() != ExactMatchEvaluator.get_evaluator_id()),
51+
*(
52+
e
53+
for e in _EVAL_EVALUATORS
54+
if e.get_evaluator_id() != ExactMatchEvaluator.get_evaluator_id()
55+
),
5256
ExactMatchEvaluator,
5357
LLMJudgeOutputEvaluator,
5458
LLMJudgeStrictJSONSimilarityOutputEvaluator,

packages/uipath/src/uipath/eval/evaluators/legacy_exact_match_evaluator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ async def evaluate(
5757
EvaluationResult: Boolean (plain match) or NumericEvaluationResult (line-by-line)
5858
"""
5959
if self.line_by_line_evaluation:
60-
return await self._evaluate_line_by_line(agent_execution, evaluation_criteria)
60+
return await self._evaluate_line_by_line(
61+
agent_execution, evaluation_criteria
62+
)
6163
return await self._evaluate_exact(agent_execution, evaluation_criteria)
6264

6365
async def _evaluate_exact(

packages/uipath/tests/evaluators/test_evaluator_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from typing import Any
1111

1212
import pytest
13+
from uipath_eval.models.models import ToolCall, ToolOutput
1314

1415
from uipath.eval._helpers.evaluators_helpers import (
1516
extract_tool_calls,
@@ -20,7 +21,6 @@
2021
tool_calls_order_score,
2122
tool_calls_output_score,
2223
)
23-
from uipath_eval.models.models import ToolCall, ToolOutput
2424

2525

2626
class TestToolCallsOrderScore:

packages/uipath/tests/evaluators/test_evaluator_methods.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
import pytest
1717
from opentelemetry.sdk.trace import ReadableSpan
1818
from pytest_mock.plugin import MockerFixture
19+
from uipath_eval.models.models import (
20+
AgentExecution,
21+
ToolCall,
22+
ToolOutput,
23+
UiPathEvaluationError,
24+
)
1925

2026
from uipath.eval.evaluators.base_evaluator import BaseEvaluatorJustification
2127
from uipath.eval.evaluators.contains_evaluator import (
@@ -57,12 +63,6 @@
5763
ToolCallOutputEvaluatorJustification,
5864
)
5965
from uipath.eval.models import NumericEvaluationResult
60-
from uipath_eval.models.models import (
61-
AgentExecution,
62-
ToolCall,
63-
ToolOutput,
64-
UiPathEvaluationError,
65-
)
6666

6767

6868
@pytest.fixture

0 commit comments

Comments
 (0)