Skip to content

Commit b16f2ea

Browse files
fix: failing build issue due to lint
1 parent 26a35fd commit b16f2ea

File tree

2 files changed

+21
-29
lines changed

2 files changed

+21
-29
lines changed

libs/labelbox/tests/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,12 @@ def create_label():
688688
predictions,
689689
)
690690
upload_task.wait_until_done(sleep_time_seconds=5)
691-
assert (
692-
upload_task.state == AnnotationImportState.FINISHED
693-
), "Label Import did not finish"
694-
assert (
695-
len(upload_task.errors) == 0
696-
), f"Label Import {upload_task.name} failed with errors {upload_task.errors}"
691+
assert upload_task.state == AnnotationImportState.FINISHED, (
692+
"Label Import did not finish"
693+
)
694+
assert len(upload_task.errors) == 0, (
695+
f"Label Import {upload_task.name} failed with errors {upload_task.errors}"
696+
)
697697

698698
project.create_label = create_label
699699
project.create_label()

libs/labelbox/tests/data/annotation_import/test_generic_data_types.py

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -271,46 +271,38 @@ def test_import_mal_annotations(
271271
def test_audio_temporal_annotations_fixtures():
272272
"""Test that audio temporal annotation fixtures are properly structured"""
273273
# This test verifies our fixtures work without requiring the full integration environment
274-
274+
275275
# Mock prediction_id_mapping structure that our fixtures expect
276276
mock_prediction_id_mapping = [
277277
{
278278
"checklist": {
279279
"tool": "checklist_tool",
280280
"name": "checklist",
281-
"value": "checklist"
282-
},
283-
"text": {
284-
"tool": "text_tool",
285-
"name": "text",
286-
"value": "text"
281+
"value": "checklist",
287282
},
288-
"radio": {
289-
"tool": "radio_tool",
290-
"name": "radio",
291-
"value": "radio"
292-
}
283+
"text": {"tool": "text_tool", "name": "text", "value": "text"},
284+
"radio": {"tool": "radio_tool", "name": "radio", "value": "radio"},
293285
}
294286
]
295-
287+
296288
# Test that our fixtures can process the mock data
297289
# Note: We can't actually call the fixtures directly in a unit test,
298290
# but we can verify the structure is correct by checking the fixture definitions
299-
291+
300292
# Verify that our fixtures are properly defined and accessible
301293
from .conftest import (
302294
audio_checklist_inference,
303-
audio_text_inference,
295+
audio_text_inference,
304296
audio_radio_inference,
305-
audio_text_entity_inference
297+
audio_text_entity_inference,
306298
)
307-
299+
308300
# Check that all required fixtures exist
309301
assert audio_checklist_inference is not None
310302
assert audio_text_inference is not None
311303
assert audio_radio_inference is not None
312304
assert audio_text_entity_inference is not None
313-
305+
314306
# Verify the fixtures are callable (they should be functions)
315307
assert callable(audio_checklist_inference)
316308
assert callable(audio_text_inference)
@@ -327,18 +319,18 @@ def test_audio_temporal_annotations_integration(
327319
"""Test that audio temporal annotations work correctly in the integration framework"""
328320
# Filter to only audio annotations
329321
audio_annotations = annotations_by_media_type[MediaType.Audio]
330-
322+
331323
# Verify we have the expected audio temporal annotations
332324
assert len(audio_annotations) == 4 # checklist, text, radio, text_entity
333-
325+
334326
# Check that temporal annotations have frame information
335327
for annotation in audio_annotations:
336328
if "frame" in annotation:
337329
assert isinstance(annotation["frame"], int)
338330
assert annotation["frame"] >= 0
339331
# Verify frame values are in milliseconds (reasonable range for audio)
340332
assert annotation["frame"] <= 600000 # 10 minutes max
341-
333+
342334
# Test import with audio temporal annotations
343335
label_import = lb.LabelImport.create_from_objects(
344336
client,
@@ -347,11 +339,11 @@ def test_audio_temporal_annotations_integration(
347339
audio_annotations,
348340
)
349341
label_import.wait_until_done()
350-
342+
351343
# Verify import was successful
352344
assert label_import.state == AnnotationImportState.FINISHED
353345
assert len(label_import.errors) == 0
354-
346+
355347
# Verify all annotations were imported successfully
356348
all_annotations = sorted([a["uuid"] for a in audio_annotations])
357349
successful_annotations = sorted(

0 commit comments

Comments
 (0)