Skip to content

Commit 8375191

Browse files
committed
fixing linter error
1 parent bb836e7 commit 8375191

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/unit/test_cli.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def test_detector_and_image_queries(detector_name: Callable):
4141
check=False,
4242
)
4343
assert completed_process.returncode == 0
44-
det_id_on_create = re.search("id='([^']+)'", completed_process.stdout).group(1)
44+
match = re.search("id='([^']+)'", completed_process.stdout)
45+
assert match is not None
46+
det_id_on_create = match.group(1)
4547
# The output of the create-detector command looks something like:
4648
# id='det_abc123'
4749
# type=<DetectorTypeEnum.detector: 'detector'>
@@ -59,7 +61,9 @@ def test_detector_and_image_queries(detector_name: Callable):
5961
check=False,
6062
)
6163
assert completed_process.returncode == 0
62-
det_id_on_get = re.search("id='([^']+)'", completed_process.stdout).group(1)
64+
match = re.search("id='([^']+)'", completed_process.stdout)
65+
assert match is not None
66+
det_id_on_get = match.group(1)
6367
assert det_id_on_create == det_id_on_get
6468
completed_process = subprocess.run(
6569
["groundlight", "get-detector", det_id_on_create],

0 commit comments

Comments
 (0)