Skip to content

Commit 091b1fa

Browse files
authored
blacken all gen'd libs (#6792)
* blacken all gen'd libs
1 parent c83e5bd commit 091b1fa

40 files changed

+25358
-16033
lines changed

packages/google-cloud-vision/google/cloud/vision_v1/proto/geometry_pb2.py

Lines changed: 293 additions & 187 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
import grpc
3-

packages/google-cloud-vision/google/cloud/vision_v1/proto/image_annotator_pb2.py

Lines changed: 3301 additions & 2073 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,78 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
import grpc
33

4-
from google.cloud.vision_v1.proto import image_annotator_pb2 as google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2
5-
from google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2
4+
from google.cloud.vision_v1.proto import (
5+
image_annotator_pb2 as google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2,
6+
)
7+
from google.longrunning import (
8+
operations_pb2 as google_dot_longrunning_dot_operations__pb2,
9+
)
610

711

812
class ImageAnnotatorStub(object):
9-
"""Service that performs Google Cloud Vision API detection tasks over client
13+
"""Service that performs Google Cloud Vision API detection tasks over client
1014
images, such as face, landmark, logo, label, and text detection. The
1115
ImageAnnotator service returns detected entities from the images.
1216
"""
1317

14-
def __init__(self, channel):
15-
"""Constructor.
18+
def __init__(self, channel):
19+
"""Constructor.
1620
1721
Args:
1822
channel: A grpc.Channel.
1923
"""
20-
self.BatchAnnotateImages = channel.unary_unary(
21-
'/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages',
22-
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString,
23-
response_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString,
24+
self.BatchAnnotateImages = channel.unary_unary(
25+
"/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages",
26+
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString,
27+
response_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString,
2428
)
25-
self.AsyncBatchAnnotateFiles = channel.unary_unary(
26-
'/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles',
27-
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.SerializeToString,
28-
response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
29+
self.AsyncBatchAnnotateFiles = channel.unary_unary(
30+
"/google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles",
31+
request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.SerializeToString,
32+
response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString,
2933
)
3034

3135

3236
class ImageAnnotatorServicer(object):
33-
"""Service that performs Google Cloud Vision API detection tasks over client
37+
"""Service that performs Google Cloud Vision API detection tasks over client
3438
images, such as face, landmark, logo, label, and text detection. The
3539
ImageAnnotator service returns detected entities from the images.
3640
"""
3741

38-
def BatchAnnotateImages(self, request, context):
39-
"""Run image detection and annotation for a batch of images.
42+
def BatchAnnotateImages(self, request, context):
43+
"""Run image detection and annotation for a batch of images.
4044
"""
41-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
42-
context.set_details('Method not implemented!')
43-
raise NotImplementedError('Method not implemented!')
45+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
46+
context.set_details("Method not implemented!")
47+
raise NotImplementedError("Method not implemented!")
4448

45-
def AsyncBatchAnnotateFiles(self, request, context):
46-
"""Run asynchronous image detection and annotation for a list of generic
49+
def AsyncBatchAnnotateFiles(self, request, context):
50+
"""Run asynchronous image detection and annotation for a list of generic
4751
files, such as PDF files, which may contain multiple pages and multiple
4852
images per page. Progress and results can be retrieved through the
4953
`google.longrunning.Operations` interface.
5054
`Operation.metadata` contains `OperationMetadata` (metadata).
5155
`Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
5256
"""
53-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
54-
context.set_details('Method not implemented!')
55-
raise NotImplementedError('Method not implemented!')
57+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
58+
context.set_details("Method not implemented!")
59+
raise NotImplementedError("Method not implemented!")
5660

5761

5862
def add_ImageAnnotatorServicer_to_server(servicer, server):
59-
rpc_method_handlers = {
60-
'BatchAnnotateImages': grpc.unary_unary_rpc_method_handler(
61-
servicer.BatchAnnotateImages,
62-
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.FromString,
63-
response_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.SerializeToString,
64-
),
65-
'AsyncBatchAnnotateFiles': grpc.unary_unary_rpc_method_handler(
66-
servicer.AsyncBatchAnnotateFiles,
67-
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.FromString,
68-
response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
69-
),
70-
}
71-
generic_handler = grpc.method_handlers_generic_handler(
72-
'google.cloud.vision.v1.ImageAnnotator', rpc_method_handlers)
73-
server.add_generic_rpc_handlers((generic_handler,))
63+
rpc_method_handlers = {
64+
"BatchAnnotateImages": grpc.unary_unary_rpc_method_handler(
65+
servicer.BatchAnnotateImages,
66+
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.FromString,
67+
response_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.SerializeToString,
68+
),
69+
"AsyncBatchAnnotateFiles": grpc.unary_unary_rpc_method_handler(
70+
servicer.AsyncBatchAnnotateFiles,
71+
request_deserializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.FromString,
72+
response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
73+
),
74+
}
75+
generic_handler = grpc.method_handlers_generic_handler(
76+
"google.cloud.vision.v1.ImageAnnotator", rpc_method_handlers
77+
)
78+
server.add_generic_rpc_handlers((generic_handler,))

0 commit comments

Comments
 (0)