Skip to content

Commit b172110

Browse files
chore(python): add nox session to sort python imports (#312)
* chore(python): add nox session to sort python imports Source-Link: googleapis/synthtool@1b71c10 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert change to region tag Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent f8adcb1 commit b172110

File tree

77 files changed

+648
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+648
-623
lines changed

packages/google-cloud-videointelligence/.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163
17-
# created: 2022-04-06T10:30:21.687684602Z
16+
digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416
17+
# created: 2022-04-20T23:42:53.970438194Z

packages/google-cloud-videointelligence/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# All configuration values have a default; values that are commented out
2525
# serve to show the default.
2626

27-
import sys
2827
import os
2928
import shlex
29+
import sys
3030

3131
# If extensions (or modules to document with autodoc) are in another directory,
3232
# add these directories to sys.path here. If the directory is relative to the

packages/google-cloud-videointelligence/google/cloud/videointelligence/__init__.py

Lines changed: 25 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -14,109 +14,60 @@
1414
# limitations under the License.
1515
#
1616

17-
from google.cloud.videointelligence_v1.services.video_intelligence_service.client import (
18-
VideoIntelligenceServiceClient,
19-
)
2017
from google.cloud.videointelligence_v1.services.video_intelligence_service.async_client import (
2118
VideoIntelligenceServiceAsyncClient,
2219
)
23-
24-
from google.cloud.videointelligence_v1.types.video_intelligence import (
25-
AnnotateVideoProgress,
20+
from google.cloud.videointelligence_v1.services.video_intelligence_service.client import (
21+
VideoIntelligenceServiceClient,
2622
)
2723
from google.cloud.videointelligence_v1.types.video_intelligence import (
24+
AnnotateVideoProgress,
2825
AnnotateVideoRequest,
29-
)
30-
from google.cloud.videointelligence_v1.types.video_intelligence import (
3126
AnnotateVideoResponse,
32-
)
33-
from google.cloud.videointelligence_v1.types.video_intelligence import DetectedAttribute
34-
from google.cloud.videointelligence_v1.types.video_intelligence import DetectedLandmark
35-
from google.cloud.videointelligence_v1.types.video_intelligence import Entity
36-
from google.cloud.videointelligence_v1.types.video_intelligence import (
27+
DetectedAttribute,
28+
DetectedLandmark,
29+
Entity,
3730
ExplicitContentAnnotation,
38-
)
39-
from google.cloud.videointelligence_v1.types.video_intelligence import (
4031
ExplicitContentDetectionConfig,
41-
)
42-
from google.cloud.videointelligence_v1.types.video_intelligence import (
4332
ExplicitContentFrame,
44-
)
45-
from google.cloud.videointelligence_v1.types.video_intelligence import FaceAnnotation
46-
from google.cloud.videointelligence_v1.types.video_intelligence import (
33+
FaceAnnotation,
4734
FaceDetectionAnnotation,
48-
)
49-
from google.cloud.videointelligence_v1.types.video_intelligence import (
5035
FaceDetectionConfig,
51-
)
52-
from google.cloud.videointelligence_v1.types.video_intelligence import FaceFrame
53-
from google.cloud.videointelligence_v1.types.video_intelligence import FaceSegment
54-
from google.cloud.videointelligence_v1.types.video_intelligence import LabelAnnotation
55-
from google.cloud.videointelligence_v1.types.video_intelligence import (
36+
FaceFrame,
37+
FaceSegment,
38+
Feature,
39+
LabelAnnotation,
5640
LabelDetectionConfig,
57-
)
58-
from google.cloud.videointelligence_v1.types.video_intelligence import LabelFrame
59-
from google.cloud.videointelligence_v1.types.video_intelligence import LabelSegment
60-
from google.cloud.videointelligence_v1.types.video_intelligence import (
41+
LabelDetectionMode,
42+
LabelFrame,
43+
LabelSegment,
44+
Likelihood,
6145
LogoRecognitionAnnotation,
62-
)
63-
from google.cloud.videointelligence_v1.types.video_intelligence import (
6446
NormalizedBoundingBox,
65-
)
66-
from google.cloud.videointelligence_v1.types.video_intelligence import (
6747
NormalizedBoundingPoly,
68-
)
69-
from google.cloud.videointelligence_v1.types.video_intelligence import NormalizedVertex
70-
from google.cloud.videointelligence_v1.types.video_intelligence import (
48+
NormalizedVertex,
7149
ObjectTrackingAnnotation,
72-
)
73-
from google.cloud.videointelligence_v1.types.video_intelligence import (
7450
ObjectTrackingConfig,
75-
)
76-
from google.cloud.videointelligence_v1.types.video_intelligence import (
7751
ObjectTrackingFrame,
78-
)
79-
from google.cloud.videointelligence_v1.types.video_intelligence import (
8052
PersonDetectionAnnotation,
81-
)
82-
from google.cloud.videointelligence_v1.types.video_intelligence import (
8353
PersonDetectionConfig,
84-
)
85-
from google.cloud.videointelligence_v1.types.video_intelligence import (
8654
ShotChangeDetectionConfig,
87-
)
88-
from google.cloud.videointelligence_v1.types.video_intelligence import SpeechContext
89-
from google.cloud.videointelligence_v1.types.video_intelligence import (
55+
SpeechContext,
9056
SpeechRecognitionAlternative,
91-
)
92-
from google.cloud.videointelligence_v1.types.video_intelligence import (
9357
SpeechTranscription,
94-
)
95-
from google.cloud.videointelligence_v1.types.video_intelligence import (
9658
SpeechTranscriptionConfig,
97-
)
98-
from google.cloud.videointelligence_v1.types.video_intelligence import TextAnnotation
99-
from google.cloud.videointelligence_v1.types.video_intelligence import (
59+
TextAnnotation,
10060
TextDetectionConfig,
101-
)
102-
from google.cloud.videointelligence_v1.types.video_intelligence import TextFrame
103-
from google.cloud.videointelligence_v1.types.video_intelligence import TextSegment
104-
from google.cloud.videointelligence_v1.types.video_intelligence import TimestampedObject
105-
from google.cloud.videointelligence_v1.types.video_intelligence import Track
106-
from google.cloud.videointelligence_v1.types.video_intelligence import (
61+
TextFrame,
62+
TextSegment,
63+
TimestampedObject,
64+
Track,
10765
VideoAnnotationProgress,
108-
)
109-
from google.cloud.videointelligence_v1.types.video_intelligence import (
11066
VideoAnnotationResults,
67+
VideoContext,
68+
VideoSegment,
69+
WordInfo,
11170
)
112-
from google.cloud.videointelligence_v1.types.video_intelligence import VideoContext
113-
from google.cloud.videointelligence_v1.types.video_intelligence import VideoSegment
114-
from google.cloud.videointelligence_v1.types.video_intelligence import WordInfo
115-
from google.cloud.videointelligence_v1.types.video_intelligence import Feature
116-
from google.cloud.videointelligence_v1.types.video_intelligence import (
117-
LabelDetectionMode,
118-
)
119-
from google.cloud.videointelligence_v1.types.video_intelligence import Likelihood
12071

12172
__all__ = (
12273
"VideoIntelligenceServiceClient",

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/__init__.py

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -14,55 +14,58 @@
1414
# limitations under the License.
1515
#
1616

17-
from .services.video_intelligence_service import VideoIntelligenceServiceClient
18-
from .services.video_intelligence_service import VideoIntelligenceServiceAsyncClient
19-
20-
from .types.video_intelligence import AnnotateVideoProgress
21-
from .types.video_intelligence import AnnotateVideoRequest
22-
from .types.video_intelligence import AnnotateVideoResponse
23-
from .types.video_intelligence import DetectedAttribute
24-
from .types.video_intelligence import DetectedLandmark
25-
from .types.video_intelligence import Entity
26-
from .types.video_intelligence import ExplicitContentAnnotation
27-
from .types.video_intelligence import ExplicitContentDetectionConfig
28-
from .types.video_intelligence import ExplicitContentFrame
29-
from .types.video_intelligence import FaceAnnotation
30-
from .types.video_intelligence import FaceDetectionAnnotation
31-
from .types.video_intelligence import FaceDetectionConfig
32-
from .types.video_intelligence import FaceFrame
33-
from .types.video_intelligence import FaceSegment
34-
from .types.video_intelligence import LabelAnnotation
35-
from .types.video_intelligence import LabelDetectionConfig
36-
from .types.video_intelligence import LabelFrame
37-
from .types.video_intelligence import LabelSegment
38-
from .types.video_intelligence import LogoRecognitionAnnotation
39-
from .types.video_intelligence import NormalizedBoundingBox
40-
from .types.video_intelligence import NormalizedBoundingPoly
41-
from .types.video_intelligence import NormalizedVertex
42-
from .types.video_intelligence import ObjectTrackingAnnotation
43-
from .types.video_intelligence import ObjectTrackingConfig
44-
from .types.video_intelligence import ObjectTrackingFrame
45-
from .types.video_intelligence import PersonDetectionAnnotation
46-
from .types.video_intelligence import PersonDetectionConfig
47-
from .types.video_intelligence import ShotChangeDetectionConfig
48-
from .types.video_intelligence import SpeechContext
49-
from .types.video_intelligence import SpeechRecognitionAlternative
50-
from .types.video_intelligence import SpeechTranscription
51-
from .types.video_intelligence import SpeechTranscriptionConfig
52-
from .types.video_intelligence import TextAnnotation
53-
from .types.video_intelligence import TextDetectionConfig
54-
from .types.video_intelligence import TextFrame
55-
from .types.video_intelligence import TextSegment
56-
from .types.video_intelligence import TimestampedObject
57-
from .types.video_intelligence import Track
58-
from .types.video_intelligence import VideoAnnotationProgress
59-
from .types.video_intelligence import VideoAnnotationResults
60-
from .types.video_intelligence import VideoContext
61-
from .types.video_intelligence import VideoSegment
62-
from .types.video_intelligence import WordInfo
63-
from .types.video_intelligence import Feature
64-
from .types.video_intelligence import LabelDetectionMode
65-
from .types.video_intelligence import Likelihood
17+
from .services.video_intelligence_service import (
18+
VideoIntelligenceServiceAsyncClient,
19+
VideoIntelligenceServiceClient,
20+
)
21+
from .types.video_intelligence import (
22+
AnnotateVideoProgress,
23+
AnnotateVideoRequest,
24+
AnnotateVideoResponse,
25+
DetectedAttribute,
26+
DetectedLandmark,
27+
Entity,
28+
ExplicitContentAnnotation,
29+
ExplicitContentDetectionConfig,
30+
ExplicitContentFrame,
31+
FaceAnnotation,
32+
FaceDetectionAnnotation,
33+
FaceDetectionConfig,
34+
FaceFrame,
35+
FaceSegment,
36+
Feature,
37+
LabelAnnotation,
38+
LabelDetectionConfig,
39+
LabelDetectionMode,
40+
LabelFrame,
41+
LabelSegment,
42+
Likelihood,
43+
LogoRecognitionAnnotation,
44+
NormalizedBoundingBox,
45+
NormalizedBoundingPoly,
46+
NormalizedVertex,
47+
ObjectTrackingAnnotation,
48+
ObjectTrackingConfig,
49+
ObjectTrackingFrame,
50+
PersonDetectionAnnotation,
51+
PersonDetectionConfig,
52+
ShotChangeDetectionConfig,
53+
SpeechContext,
54+
SpeechRecognitionAlternative,
55+
SpeechTranscription,
56+
SpeechTranscriptionConfig,
57+
TextAnnotation,
58+
TextDetectionConfig,
59+
TextFrame,
60+
TextSegment,
61+
TimestampedObject,
62+
Track,
63+
VideoAnnotationProgress,
64+
VideoAnnotationResults,
65+
VideoContext,
66+
VideoSegment,
67+
WordInfo,
68+
)
6669

6770
__all__ = (
6871
"VideoIntelligenceServiceAsyncClient",

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/services/video_intelligence_service/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from .client import VideoIntelligenceServiceClient
1716
from .async_client import VideoIntelligenceServiceAsyncClient
17+
from .client import VideoIntelligenceServiceClient
1818

1919
__all__ = (
2020
"VideoIntelligenceServiceClient",

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/services/video_intelligence_service/async_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
import functools
1818
import re
1919
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
2120

22-
from google.api_core.client_options import ClientOptions
2321
from google.api_core import exceptions as core_exceptions
2422
from google.api_core import gapic_v1
2523
from google.api_core import retry as retries
24+
from google.api_core.client_options import ClientOptions
2625
from google.auth import credentials as ga_credentials # type: ignore
2726
from google.oauth2 import service_account # type: ignore
27+
import pkg_resources
2828

2929
try:
3030
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -33,10 +33,12 @@
3333

3434
from google.api_core import operation # type: ignore
3535
from google.api_core import operation_async # type: ignore
36+
3637
from google.cloud.videointelligence_v1.types import video_intelligence
37-
from .transports.base import VideoIntelligenceServiceTransport, DEFAULT_CLIENT_INFO
38-
from .transports.grpc_asyncio import VideoIntelligenceServiceGrpcAsyncIOTransport
38+
3939
from .client import VideoIntelligenceServiceClient
40+
from .transports.base import DEFAULT_CLIENT_INFO, VideoIntelligenceServiceTransport
41+
from .transports.grpc_asyncio import VideoIntelligenceServiceGrpcAsyncIOTransport
4042

4143

4244
class VideoIntelligenceServiceAsyncClient:

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/services/video_intelligence_service/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
import os
1818
import re
1919
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
2120

2221
from google.api_core import client_options as client_options_lib
2322
from google.api_core import exceptions as core_exceptions
2423
from google.api_core import gapic_v1
2524
from google.api_core import retry as retries
2625
from google.auth import credentials as ga_credentials # type: ignore
26+
from google.auth.exceptions import MutualTLSChannelError # type: ignore
2727
from google.auth.transport import mtls # type: ignore
2828
from google.auth.transport.grpc import SslCredentials # type: ignore
29-
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3029
from google.oauth2 import service_account # type: ignore
30+
import pkg_resources
3131

3232
try:
3333
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
@@ -36,8 +36,10 @@
3636

3737
from google.api_core import operation # type: ignore
3838
from google.api_core import operation_async # type: ignore
39+
3940
from google.cloud.videointelligence_v1.types import video_intelligence
40-
from .transports.base import VideoIntelligenceServiceTransport, DEFAULT_CLIENT_INFO
41+
42+
from .transports.base import DEFAULT_CLIENT_INFO, VideoIntelligenceServiceTransport
4143
from .transports.grpc import VideoIntelligenceServiceGrpcTransport
4244
from .transports.grpc_asyncio import VideoIntelligenceServiceGrpcAsyncIOTransport
4345

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/services/video_intelligence_service/transports/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from .grpc import VideoIntelligenceServiceGrpcTransport
2121
from .grpc_asyncio import VideoIntelligenceServiceGrpcAsyncIOTransport
2222

23-
2423
# Compile a registry of transports.
2524
_transport_registry = (
2625
OrderedDict()

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/services/video_intelligence_service/transports/base.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@
1515
#
1616
import abc
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
18-
import pkg_resources
1918

20-
import google.auth # type: ignore
2119
import google.api_core
2220
from google.api_core import exceptions as core_exceptions
23-
from google.api_core import gapic_v1
21+
from google.api_core import gapic_v1, operations_v1
2422
from google.api_core import retry as retries
25-
from google.api_core import operations_v1
23+
import google.auth # type: ignore
2624
from google.auth import credentials as ga_credentials # type: ignore
25+
from google.longrunning import operations_pb2 # type: ignore
2726
from google.oauth2 import service_account # type: ignore
27+
import pkg_resources
2828

2929
from google.cloud.videointelligence_v1.types import video_intelligence
30-
from google.longrunning import operations_pb2 # type: ignore
3130

3231
try:
3332
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(

packages/google-cloud-videointelligence/google/cloud/videointelligence_v1/services/video_intelligence_service/transports/grpc.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,19 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
import warnings
1716
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
17+
import warnings
1818

19-
from google.api_core import grpc_helpers
20-
from google.api_core import operations_v1
21-
from google.api_core import gapic_v1
19+
from google.api_core import gapic_v1, grpc_helpers, operations_v1
2220
import google.auth # type: ignore
2321
from google.auth import credentials as ga_credentials # type: ignore
2422
from google.auth.transport.grpc import SslCredentials # type: ignore
25-
23+
from google.longrunning import operations_pb2 # type: ignore
2624
import grpc # type: ignore
2725

2826
from google.cloud.videointelligence_v1.types import video_intelligence
29-
from google.longrunning import operations_pb2 # type: ignore
30-
from .base import VideoIntelligenceServiceTransport, DEFAULT_CLIENT_INFO
27+
28+
from .base import DEFAULT_CLIENT_INFO, VideoIntelligenceServiceTransport
3129

3230

3331
class VideoIntelligenceServiceGrpcTransport(VideoIntelligenceServiceTransport):

0 commit comments

Comments
 (0)