Skip to content

Commit 840a74f

Browse files
author
Tyler Romero
committed
fix lint issues
1 parent 2e25c98 commit 840a74f

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

test/integration/test_groundlight.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
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
1712
from ksuid import KsuidMs
1813
from model import (
1914
BinaryClassificationResult,
@@ -26,6 +21,12 @@
2621
PaginatedImageQueryList,
2722
)
2823

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+
2930
DEFAULT_CONFIDENCE_THRESHOLD = 0.9
3031
IQ_IMPROVEMENT_THRESHOLD = 0.75
3132

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

9091

9192
def test_create_detector_with_pipeline_config(gl: Groundlight):
@@ -149,9 +150,9 @@ def test_create_detector_with_confidence_threshold(gl: Groundlight):
149150

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

156157

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

test/unit/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from datetime import datetime
22

33
import pytest
4-
from groundlight import ExperimentalApi, Groundlight
54
from model import Detector, ImageQuery, ImageQueryTypeEnum, ResultTypeEnum
65

6+
from groundlight import ExperimentalApi, Groundlight
7+
78

89
def pytest_configure(config):
910
# Run environment check before tests

test/unit/test_experimental.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
from datetime import datetime, timezone
33

44
import pytest
5-
from groundlight import ExperimentalApi
65
from model import Detector, ImageQuery
76

7+
from groundlight import ExperimentalApi
8+
89

910
def test_detector_groups(gl_experimental: ExperimentalApi):
1011
"""

0 commit comments

Comments
 (0)