Skip to content

Commit b2a77af

Browse files
Thomas CarrollThomas Carroll
authored andcommitted
feat: update deps & re-lint
1 parent 3d9e87f commit b2a77af

16 files changed

Lines changed: 95 additions & 94 deletions

examples/utils/streaming_classify_utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
import typing
66
from collections.abc import AsyncIterator
77

8+
from resolver_athena_client.generated.athena.models_pb2 import (
9+
ClassificationOutput,
10+
ClassifyResponse,
11+
)
12+
813
from resolver_athena_client.client.athena_client import AthenaClient
914
from resolver_athena_client.client.athena_options import AthenaOptions
1015
from resolver_athena_client.client.channel import (
@@ -17,10 +22,6 @@
1722
has_output_errors,
1823
process_classification_outputs,
1924
)
20-
from resolver_athena_client.generated.athena.models_pb2 import (
21-
ClassificationOutput,
22-
ClassifyResponse,
23-
)
2425

2526
T = typing.TypeVar("T")
2627

src/resolver_athena_client/client/athena_client.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
from collections.abc import AsyncGenerator, AsyncIterable, AsyncIterator
88

99
import grpc
10+
from resolver_athena_client.generated.athena.models_pb2 import (
11+
ClassificationInput,
12+
ClassificationOutput,
13+
ClassifyRequest,
14+
ClassifyResponse,
15+
HashType,
16+
ImageFormat,
17+
ImageHash,
18+
RequestEncoding,
19+
)
1020
from typing_extensions import Self
1121

1222
from resolver_athena_client.client.athena_options import AthenaOptions
@@ -19,16 +29,6 @@
1929
from resolver_athena_client.client.transformers.worker_batcher import (
2030
WorkerBatcher,
2131
)
22-
from resolver_athena_client.generated.athena.models_pb2 import (
23-
ClassificationInput,
24-
ClassificationOutput,
25-
ClassifyRequest,
26-
ClassifyResponse,
27-
HashType,
28-
ImageFormat,
29-
ImageHash,
30-
RequestEncoding,
31-
)
3232
from resolver_athena_client.grpc_wrappers.classifier_service import (
3333
ClassifierServiceClient,
3434
)

src/resolver_athena_client/client/deployment_selector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from types import TracebackType
55

66
import grpc
7-
from typing_extensions import Self
8-
97
from resolver_athena_client.generated.athena.models_pb2 import (
108
ListDeploymentsResponse,
119
)
10+
from typing_extensions import Self
11+
1212
from resolver_athena_client.grpc_wrappers.classifier_service import (
1313
ClassifierServiceClient,
1414
)

src/resolver_athena_client/client/transformers/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import brotli
1212
import cv2 as cv
1313
import numpy as np
14+
from resolver_athena_client.generated.athena.models_pb2 import ImageFormat
1415

1516
from resolver_athena_client.client.consts import EXPECTED_HEIGHT, EXPECTED_WIDTH
1617
from resolver_athena_client.client.models import ImageData
17-
from resolver_athena_client.generated.athena.models_pb2 import ImageFormat
1818

1919
# Global optimization constants
2020
_target_size = (EXPECTED_WIDTH, EXPECTED_HEIGHT)

src/resolver_athena_client/grpc_wrappers/classifier_service.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from google.protobuf.empty_pb2 import Empty
1010
from grpc import aio
11-
1211
from resolver_athena_client.generated.athena.athena_pb2_grpc import (
1312
ClassifierServiceStub,
1413
)

tests/client/models/test_image_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""Tests for ImageData model."""
22

33
import pytest
4+
from resolver_athena_client.generated.athena.models_pb2 import ImageFormat
45

56
from resolver_athena_client.client.models import ImageData
6-
from resolver_athena_client.generated.athena.models_pb2 import ImageFormat
77

88

99
def test_image_data_detects_png_format() -> None:

tests/client/test_athena_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
import pytest
88
from grpc import aio
9-
10-
from resolver_athena_client.client.athena_client import AthenaClient
11-
from resolver_athena_client.client.athena_options import AthenaOptions
12-
from resolver_athena_client.client.exceptions import AthenaError
13-
from resolver_athena_client.client.models import ImageData
149
from resolver_athena_client.generated.athena.models_pb2 import (
1510
ClassificationError,
1611
ClassificationOutput,
1712
ClassifyResponse,
1813
ErrorCode,
1914
)
15+
16+
from resolver_athena_client.client.athena_client import AthenaClient
17+
from resolver_athena_client.client.athena_options import AthenaOptions
18+
from resolver_athena_client.client.exceptions import AthenaError
19+
from resolver_athena_client.client.models import ImageData
2020
from resolver_athena_client.grpc_wrappers.classifier_service import (
2121
ClassifierServiceClient,
2222
)

tests/client/test_deployment_selector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
import pytest
66
from grpc import aio
7-
8-
from resolver_athena_client.client.deployment_selector import DeploymentSelector
97
from resolver_athena_client.generated.athena.models_pb2 import (
108
Deployment,
119
ListDeploymentsResponse,
1210
)
11+
12+
from resolver_athena_client.client.deployment_selector import DeploymentSelector
1313
from resolver_athena_client.grpc_wrappers.classifier_service import (
1414
ClassifierServiceClient,
1515
)

tests/client/test_image_format_detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Tests for image format detection."""
22

33
import pytest
4+
from resolver_athena_client.generated.athena.models_pb2 import ImageFormat
45

56
from resolver_athena_client.client.image_format_detector import (
67
detect_image_format,
78
)
8-
from resolver_athena_client.generated.athena.models_pb2 import ImageFormat
99

1010

1111
def test_detect_png_format() -> None:

tests/client/test_output_error_handling.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
"""Test classification output error handling functionality."""
22

33
import pytest
4+
from resolver_athena_client.generated.athena.models_pb2 import (
5+
Classification,
6+
ClassificationError,
7+
ClassificationOutput,
8+
ClassifyResponse,
9+
ErrorCode,
10+
)
411

512
from resolver_athena_client.client.exceptions import ClassificationOutputError
613
from resolver_athena_client.client.utils import (
@@ -10,13 +17,6 @@
1017
log_output_errors,
1118
process_classification_outputs,
1219
)
13-
from resolver_athena_client.generated.athena.models_pb2 import (
14-
Classification,
15-
ClassificationError,
16-
ClassificationOutput,
17-
ClassifyResponse,
18-
ErrorCode,
19-
)
2020

2121
# Test constants
2222
EXPECTED_SUCCESS_COUNT = 2

0 commit comments

Comments
 (0)