Skip to content

Commit 58b030b

Browse files
committed
style: lint fix
1 parent f11bf96 commit 58b030b

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
],
55
"python.testing.unittestEnabled": false,
66
"python.testing.pytestEnabled": true
7-
}
7+
}

src/resolver_athena_client/client/athena_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ async def shutdown_worker(
441441
for result in results
442442
if isinstance(
443443
result,
444-
(asyncio.CancelledError, ConnectionError, OSError),
444+
asyncio.CancelledError | ConnectionError | OSError,
445445
)
446446
]
447447

tests/functional/conftest.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
import pytest_asyncio
1313
from dotenv import load_dotenv
1414
from grpc.aio import Channel
15-
from resolver_athena_client.generated.athena.models_pb2 import (
16-
ClassificationOutput,
17-
)
1815

1916
from resolver_athena_client.client.athena_client import AthenaClient
2017
from resolver_athena_client.client.athena_options import AthenaOptions
@@ -28,6 +25,9 @@
2825
MAX_DEPLOYMENT_ID_LENGTH,
2926
)
3027
from resolver_athena_client.client.models.input_model import ImageData
28+
from resolver_athena_client.generated.athena.models_pb2 import (
29+
ClassificationOutput,
30+
)
3131

3232

3333
def _create_base_test_image_opencv(width: int, height: int) -> np.ndarray:
@@ -216,7 +216,9 @@ async def send(self, image_data: ImageData) -> ClassificationOutput:
216216

217217
if image_data.correlation_id is None:
218218
image_data.correlation_id = str(uuid.uuid4())
219-
future = asyncio.get_event_loop().create_future()
219+
future: Future[ClassificationOutput] = (
220+
asyncio.get_event_loop().create_future()
221+
)
220222
self._pending_results[image_data.correlation_id] = future
221223

222224
await self._request_queue.put(image_data)

tests/functional/e2e/test_classify_single.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414
FP_ERROR_TOLERANCE = 1e-4
1515

1616

17+
def _test_id(tc: AthenaTestCase) -> str:
18+
return str(tc.id)
19+
20+
1721
@pytest.mark.asyncio(loop_scope="session")
1822
@pytest.mark.functional
1923
@pytest.mark.e2e
20-
@pytest.mark.parametrize("test_case", TEST_CASES, ids=lambda tc: tc.id)
24+
@pytest.mark.parametrize("test_case", TEST_CASES, ids=_test_id)
2125
async def test_e2e_case(
2226
streaming_sender: StreamingSender,
2327
test_case: AthenaTestCase,

0 commit comments

Comments
 (0)