Skip to content

Commit 2e74e6a

Browse files
author
Auto-format Bot
committed
Automatically reformatting code
1 parent 840a74f commit 2e74e6a

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

test/integration/test_groundlight.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
from typing import Any, Dict, Optional, Union
1010

1111
import pytest
12+
from groundlight import Groundlight
13+
from groundlight.binary_labels import VALID_DISPLAY_LABELS, Label, convert_internal_label_to_display
14+
from groundlight.internalapi import ApiException, InternalApiError, NotFoundError
15+
from groundlight.optional_imports import *
16+
from groundlight.status_codes import is_user_error
1217
from ksuid import KsuidMs
1318
from model import (
1419
BinaryClassificationResult,
@@ -21,12 +26,6 @@
2126
PaginatedImageQueryList,
2227
)
2328

24-
from groundlight import Groundlight
25-
from groundlight.binary_labels import VALID_DISPLAY_LABELS, Label, convert_internal_label_to_display
26-
from groundlight.internalapi import ApiException, InternalApiError, NotFoundError
27-
from groundlight.optional_imports import *
28-
from groundlight.status_codes import is_user_error
29-
3029
DEFAULT_CONFIDENCE_THRESHOLD = 0.9
3130
IQ_IMPROVEMENT_THRESHOLD = 0.75
3231

@@ -84,9 +83,9 @@ def test_create_detector(gl: Groundlight):
8483
_detector = gl.create_detector(name=name, query=query)
8584
assert str(_detector)
8685
assert isinstance(_detector, Detector)
87-
assert _detector.confidence_threshold == DEFAULT_CONFIDENCE_THRESHOLD, (
88-
"We expected the default confidence threshold to be used."
89-
)
86+
assert (
87+
_detector.confidence_threshold == DEFAULT_CONFIDENCE_THRESHOLD
88+
), "We expected the default confidence threshold to be used."
9089

9190

9291
def test_create_detector_with_pipeline_config(gl: Groundlight):
@@ -150,9 +149,9 @@ def test_create_detector_with_confidence_threshold(gl: Groundlight):
150149

151150
# If the confidence is not provided, we will use the existing detector's confidence.
152151
retrieved_detector = gl.get_or_create_detector(name=name, query=query)
153-
assert retrieved_detector.confidence_threshold == confidence_threshold, (
154-
"We expected to retrieve the existing detector's confidence, but got a different value."
155-
)
152+
assert (
153+
retrieved_detector.confidence_threshold == confidence_threshold
154+
), "We expected to retrieve the existing detector's confidence, but got a different value."
156155

157156

158157
@pytest.mark.skip_for_edge_endpoint(reason="The edge-endpoint does not support passing detector metadata.")

test/unit/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
from datetime import datetime
22

33
import pytest
4-
from model import Detector, ImageQuery, ImageQueryTypeEnum, ResultTypeEnum
5-
64
from groundlight import ExperimentalApi, Groundlight
5+
from model import Detector, ImageQuery, ImageQueryTypeEnum, ResultTypeEnum
76

87

98
def pytest_configure(config):

test/unit/test_experimental.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
from datetime import datetime, timezone
33

44
import pytest
5-
from model import Detector, ImageQuery
6-
75
from groundlight import ExperimentalApi
6+
from model import Detector, ImageQuery
87

98

109
def test_detector_groups(gl_experimental: ExperimentalApi):

0 commit comments

Comments
 (0)