Skip to content

Commit 8f79aa3

Browse files
committed
run nox
1 parent 3858e54 commit 8f79aa3

26 files changed

Lines changed: 210 additions & 202 deletions

File tree

packages/google-cloud-vision/google/cloud/vision_v1/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727
# this code path once we drop support for Python 3.7
2828
import importlib_metadata as metadata
2929

30+
from google.cloud.vision_helpers import VisionHelpers
31+
from google.cloud.vision_helpers.decorators import add_single_feature_methods
3032

31-
from .services.image_annotator import ImageAnnotatorAsyncClient, ImageAnnotatorClient
33+
from .services.image_annotator import ImageAnnotatorAsyncClient
34+
from .services.image_annotator import ImageAnnotatorClient as IacImageAnnotatorClient
3235
from .services.product_search import ProductSearchAsyncClient, ProductSearchClient
3336
from .types.geometry import BoundingPoly, NormalizedVertex, Position, Vertex
3437
from .types.image_annotator import (
@@ -204,6 +207,13 @@ def _get_version(dependency_name):
204207
+ "https://devguide.python.org/versions/"
205208
)
206209

210+
211+
@add_single_feature_methods
212+
class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
213+
__doc__ = IacImageAnnotatorClient.__doc__
214+
Feature = Feature
215+
216+
207217
__all__ = (
208218
"ImageAnnotatorAsyncClient",
209219
"ProductSearchAsyncClient",

packages/google-cloud-vision/google/cloud/vision_v1/services/image_annotator/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,11 @@ def __init__(
649649

650650
universe_domain_opt = getattr(self._client_options, "universe_domain", None)
651651

652-
self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
653-
ImageAnnotatorClient._read_environment_variables()
654-
)
652+
(
653+
self._use_client_cert,
654+
self._use_mtls_endpoint,
655+
self._universe_domain_env,
656+
) = ImageAnnotatorClient._read_environment_variables()
655657
self._client_cert_source = ImageAnnotatorClient._get_client_cert_source(
656658
self._client_options.client_cert_source, self._use_client_cert
657659
)

packages/google-cloud-vision/google/cloud/vision_v1/services/product_search/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,11 @@ def __init__(
694694

695695
universe_domain_opt = getattr(self._client_options, "universe_domain", None)
696696

697-
self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
698-
ProductSearchClient._read_environment_variables()
699-
)
697+
(
698+
self._use_client_cert,
699+
self._use_mtls_endpoint,
700+
self._universe_domain_env,
701+
) = ProductSearchClient._read_environment_variables()
700702
self._client_cert_source = ProductSearchClient._get_client_cert_source(
701703
self._client_options.client_cert_source, self._use_client_cert
702704
)

packages/google-cloud-vision/google/cloud/vision_v1/types/__init__.py

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .geometry import (
17-
BoundingPoly,
18-
NormalizedVertex,
19-
Position,
20-
Vertex,
21-
)
16+
from .geometry import BoundingPoly, NormalizedVertex, Position, Vertex
2217
from .image_annotator import (
2318
AnnotateFileRequest,
2419
AnnotateFileResponse,
@@ -61,10 +56,7 @@
6156
TextDetectionParams,
6257
WebDetectionParams,
6358
)
64-
from .product_search import (
65-
ProductSearchParams,
66-
ProductSearchResults,
67-
)
59+
from .product_search import ProductSearchParams, ProductSearchResults
6860
from .product_search_service import (
6961
AddProductToProductSetRequest,
7062
BatchOperationMetadata,
@@ -98,17 +90,8 @@
9890
UpdateProductRequest,
9991
UpdateProductSetRequest,
10092
)
101-
from .text_annotation import (
102-
Block,
103-
Page,
104-
Paragraph,
105-
Symbol,
106-
TextAnnotation,
107-
Word,
108-
)
109-
from .web_detection import (
110-
WebDetection,
111-
)
93+
from .text_annotation import Block, Page, Paragraph, Symbol, TextAnnotation, Word
94+
from .web_detection import WebDetection
11295

11396
__all__ = (
11497
"BoundingPoly",

packages/google-cloud-vision/google/cloud/vision_v1p1beta1/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727
# this code path once we drop support for Python 3.7
2828
import importlib_metadata as metadata
2929

30+
from google.cloud.vision_helpers import VisionHelpers
31+
from google.cloud.vision_helpers.decorators import add_single_feature_methods
3032

31-
from .services.image_annotator import ImageAnnotatorAsyncClient, ImageAnnotatorClient
33+
from .services.image_annotator import ImageAnnotatorAsyncClient
34+
from .services.image_annotator import ImageAnnotatorClient as IacImageAnnotatorClient
3235
from .types.geometry import BoundingPoly, Position, Vertex
3336
from .types.image_annotator import (
3437
AnnotateImageRequest,
@@ -152,6 +155,13 @@ def _get_version(dependency_name):
152155
+ "https://devguide.python.org/versions/"
153156
)
154157

158+
159+
@add_single_feature_methods
160+
class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
161+
__doc__ = IacImageAnnotatorClient.__doc__
162+
Feature = Feature
163+
164+
155165
__all__ = (
156166
"ImageAnnotatorAsyncClient",
157167
"AnnotateImageRequest",

packages/google-cloud-vision/google/cloud/vision_v1p1beta1/services/image_annotator/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,11 @@ def __init__(
598598

599599
universe_domain_opt = getattr(self._client_options, "universe_domain", None)
600600

601-
self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
602-
ImageAnnotatorClient._read_environment_variables()
603-
)
601+
(
602+
self._use_client_cert,
603+
self._use_mtls_endpoint,
604+
self._universe_domain_env,
605+
) = ImageAnnotatorClient._read_environment_variables()
604606
self._client_cert_source = ImageAnnotatorClient._get_client_cert_source(
605607
self._client_options.client_cert_source, self._use_client_cert
606608
)

packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/__init__.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .geometry import (
17-
BoundingPoly,
18-
Position,
19-
Vertex,
20-
)
16+
from .geometry import BoundingPoly, Position, Vertex
2117
from .image_annotator import (
2218
AnnotateImageRequest,
2319
AnnotateImageResponse,
@@ -43,17 +39,8 @@
4339
TextDetectionParams,
4440
WebDetectionParams,
4541
)
46-
from .text_annotation import (
47-
Block,
48-
Page,
49-
Paragraph,
50-
Symbol,
51-
TextAnnotation,
52-
Word,
53-
)
54-
from .web_detection import (
55-
WebDetection,
56-
)
42+
from .text_annotation import Block, Page, Paragraph, Symbol, TextAnnotation, Word
43+
from .web_detection import WebDetection
5744

5845
__all__ = (
5946
"BoundingPoly",

packages/google-cloud-vision/google/cloud/vision_v1p2beta1/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727
# this code path once we drop support for Python 3.7
2828
import importlib_metadata as metadata
2929

30+
from google.cloud.vision_helpers import VisionHelpers
31+
from google.cloud.vision_helpers.decorators import add_single_feature_methods
3032

31-
from .services.image_annotator import ImageAnnotatorAsyncClient, ImageAnnotatorClient
33+
from .services.image_annotator import ImageAnnotatorAsyncClient
34+
from .services.image_annotator import ImageAnnotatorClient as IacImageAnnotatorClient
3235
from .types.geometry import BoundingPoly, NormalizedVertex, Position, Vertex
3336
from .types.image_annotator import (
3437
AnnotateFileResponse,
@@ -163,6 +166,13 @@ def _get_version(dependency_name):
163166
+ "https://devguide.python.org/versions/"
164167
)
165168

169+
170+
@add_single_feature_methods
171+
class ImageAnnotatorClient(VisionHelpers, IacImageAnnotatorClient):
172+
__doc__ = IacImageAnnotatorClient.__doc__
173+
Feature = Feature
174+
175+
166176
__all__ = (
167177
"ImageAnnotatorAsyncClient",
168178
"AnnotateFileResponse",

packages/google-cloud-vision/google/cloud/vision_v1p2beta1/services/image_annotator/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,11 @@ def __init__(
603603

604604
universe_domain_opt = getattr(self._client_options, "universe_domain", None)
605605

606-
self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
607-
ImageAnnotatorClient._read_environment_variables()
608-
)
606+
(
607+
self._use_client_cert,
608+
self._use_mtls_endpoint,
609+
self._universe_domain_env,
610+
) = ImageAnnotatorClient._read_environment_variables()
609611
self._client_cert_source = ImageAnnotatorClient._get_client_cert_source(
610612
self._client_options.client_cert_source, self._use_client_cert
611613
)

packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/__init__.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .geometry import (
17-
BoundingPoly,
18-
NormalizedVertex,
19-
Position,
20-
Vertex,
21-
)
16+
from .geometry import BoundingPoly, NormalizedVertex, Position, Vertex
2217
from .image_annotator import (
2318
AnnotateFileResponse,
2419
AnnotateImageRequest,
@@ -55,17 +50,8 @@
5550
TextDetectionParams,
5651
WebDetectionParams,
5752
)
58-
from .text_annotation import (
59-
Block,
60-
Page,
61-
Paragraph,
62-
Symbol,
63-
TextAnnotation,
64-
Word,
65-
)
66-
from .web_detection import (
67-
WebDetection,
68-
)
53+
from .text_annotation import Block, Page, Paragraph, Symbol, TextAnnotation, Word
54+
from .web_detection import WebDetection
6955

7056
__all__ = (
7157
"BoundingPoly",

0 commit comments

Comments
 (0)