Skip to content

Commit b0ece7c

Browse files
fix: resolve E501 line-too-long linting errors
1 parent ca23957 commit b0ece7c

5 files changed

Lines changed: 25 additions & 11 deletions

File tree

examples/utils/streaming_classify_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def classify_images(
132132
received_count,
133133
error_count,
134134
)
135-
# Explicitly close the async generator to terminate the stream
135+
# Close async generator to terminate stream
136136
await results.aclose()
137137
break
138138

tests/functional/e2e/test_classify_single.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ async def test_classify_single(
6262
for label in test_case.expected_output:
6363
expected = test_case.expected_output[label]
6464
actual = actual_output[label]
65-
assert abs(expected - actual) < FP_ERROR_TOLERANCE, (
66-
f"Weight for label '{label}' differs by more than {FP_ERROR_TOLERANCE}: "
67-
f"expected={expected}, actual={actual}, diff={abs(expected - actual)}"
65+
diff = abs(expected - actual)
66+
assert diff < FP_ERROR_TOLERANCE, (
67+
f"Weight for label '{label}' differs by more than "
68+
f"{FP_ERROR_TOLERANCE}: expected={expected}, actual={actual}, "
69+
f"diff={diff}"
6870
)

tests/functional/test_classify_streaming.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ async def test_streaming_classify(
5959
assert sent == received, f"Incomplete: {sent} sent, {received} received"
6060

6161

62-
@pytest.mark.skip(reason="Relies on server-side shared queue behavior - needs investigation")
62+
@pytest.mark.skip(
63+
reason="Relies on server-side shared queue behavior - needs investigation"
64+
)
6365
@pytest.mark.asyncio
6466
@pytest.mark.functional
6567
async def test_streaming_classify_with_reopened_stream(

tests/functional/test_color_channels.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ async def test_classify_color_channels(
7272
msg = f"Red image classification error: {red_result.error.message}"
7373
pytest.fail(msg)
7474

75-
assert len(red_result.classifications) > 0, "No classifications for red image"
75+
assert (
76+
len(red_result.classifications) > 0
77+
), "No classifications for red image"
7678

7779
# Test green channel image
7880
green_image_bytes = create_color_channel_image("green")
@@ -82,7 +84,8 @@ async def test_classify_color_channels(
8284

8385
if green_result.error.code:
8486
msg = (
85-
f"Green image classification error: {green_result.error.message}"
87+
"Green image classification error: "
88+
f"{green_result.error.message}"
8689
)
8790
pytest.fail(msg)
8891

@@ -97,7 +100,10 @@ async def test_classify_color_channels(
97100
blue_result = await client.classify_single(blue_image_data)
98101

99102
if blue_result.error.code:
100-
msg = f"Blue image classification error: {blue_result.error.message}"
103+
msg = (
104+
"Blue image classification error: "
105+
f"{blue_result.error.message}"
106+
)
101107
pytest.fail(msg)
102108

103109
assert (
@@ -106,5 +112,9 @@ async def test_classify_color_channels(
106112

107113
# Verify all three images were successfully classified
108114
assert red_result.classifications, "Red image has no classifications"
109-
assert green_result.classifications, "Green image has no classifications"
110-
assert blue_result.classifications, "Blue image has no classifications"
115+
assert (
116+
green_result.classifications
117+
), "Green image has no classifications"
118+
assert (
119+
blue_result.classifications
120+
), "Blue image has no classifications"

tests/utils/streaming_classify_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ async def classify_images(
127127
received_count,
128128
error_count,
129129
)
130-
# Explicitly close the async generator to terminate the stream
130+
# Close async generator to terminate stream
131131
await results.aclose()
132132
break
133133

0 commit comments

Comments
 (0)