From b11c3dd6e214ba529026e6023c43baaa8ab65597 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kuzmik Date: Fri, 22 Nov 2024 15:48:20 +0100 Subject: [PATCH] Fix lint errors --- sdks/python/tests/e2e/test_experiment.py | 2 -- sdks/python/tests/e2e/verifiers.py | 2 +- sdks/python/tests/unit/evaluation/test_evaluate.py | 6 +----- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sdks/python/tests/e2e/test_experiment.py b/sdks/python/tests/e2e/test_experiment.py index bdaef02d83..f3d3809614 100644 --- a/sdks/python/tests/e2e/test_experiment.py +++ b/sdks/python/tests/e2e/test_experiment.py @@ -277,7 +277,6 @@ def task(item: Dict[str, Any]): "reference": item["expected_model_output"]["output"], } - raise AssertionError( f"Task received dataset item with an unexpected input: {item['input']}" ) @@ -334,4 +333,3 @@ def task(item: Dict[str, Any]): feedback_scores_amount=3, prompt=prompt, ) - diff --git a/sdks/python/tests/e2e/verifiers.py b/sdks/python/tests/e2e/verifiers.py index 245ec220d9..a1309b785c 100644 --- a/sdks/python/tests/e2e/verifiers.py +++ b/sdks/python/tests/e2e/verifiers.py @@ -236,7 +236,7 @@ def verify_experiment( def verify_experiment_metadata( experiment_content: ExperimentPublic, metadata: Optional[Dict[str, Any]], -): +): experiment_metadata = experiment_content.metadata if experiment_content.metadata is not None: experiment_metadata = {**experiment_content.metadata} diff --git a/sdks/python/tests/unit/evaluation/test_evaluate.py b/sdks/python/tests/unit/evaluation/test_evaluate.py index 3faabc7d62..7606a6b0c1 100644 --- a/sdks/python/tests/unit/evaluation/test_evaluate.py +++ b/sdks/python/tests/unit/evaluation/test_evaluate.py @@ -75,10 +75,7 @@ def say_task(dataset_item: Dict[str, Any]): ) mock_experiment.insert.assert_has_calls( - [ - mock.call(experiment_items=mock.ANY), - mock.call(experiment_items=mock.ANY) - ] + [mock.call(experiment_items=mock.ANY), mock.call(experiment_items=mock.ANY)] ) EXPECTED_TRACE_TREES = [ TraceModel( @@ -153,7 +150,6 @@ def say_task(dataset_item: Dict[str, Any]): "reference": dataset_item["expected_output"]["message"], } raise Exception - mock_experiment = mock.Mock() mock_create_experiment = mock.Mock()