8000 chore(python): add nox session to sort python imports (#285) · googleapis/google-cloud-python@b70fe23 · GitHub
[go: up one dir, main page]

Skip to content

Commit b70fe23

Browse files
chore(python): add nox session to sort python imports (#285)
Source-Link: googleapis/synthtool@1b71c10 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ece2d18 commit b70fe23

File tree

29 files changed

+166
-134
lines changed

29 files changed

+166
-134
lines changed

packages/google-cloud-texttospeech/.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-texttospeech/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-texttospeech/google/cloud/texttospeech/__init__.py

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

17+
from google.cloud.texttospeech_v1.services.text_to_speech.async_client import (
18+
TextToSpeechAsyncClient,
19+
)
1720
from google.cloud.texttospeech_v1.services.text_to_speech.client import (
1821
TextToSpeechClient,
1922
)
20-
from google.cloud.texttospeech_v1.services.text_to_speech.async_client import (
21-
TextToSpeechAsyncClient,
23+
from google.cloud.texttospeech_v1.types.cloud_tts import (
24+
AudioConfig,
25+
AudioEncoding,
26+
CustomVoiceParams,
27+
ListVoicesRequest,
28+
ListVoicesResponse,
29+
SsmlVoiceGender,
30+
SynthesisInput,
31+
SynthesizeSpeechRequest,
32+
SynthesizeSpeechResponse,
33+
Voice,
34+
VoiceSelectionParams,
2235
)
2336

24-
from google.cloud.texttospeech_v1.types.cloud_tts import AudioConfig
25-
from google.cloud.texttospeech_v1.types.cloud_tts import CustomVoiceParams
26-
from google.cloud.texttospeech_v1.types.cloud_tts import ListVoicesRequest
27-
from google.cloud.texttospeech_v1.types.cloud_tts import ListVoicesResponse
28-
from google.cloud.texttospeech_v1.types.cloud_tts import SynthesisInput
29-
from google.cloud.texttospeech_v1.types.cloud_tts import SynthesizeSpeechRequest
30-
from google.cloud.texttospeech_v1.types.cloud_tts import SynthesizeSpeechResponse
31-
from google.cloud.texttospeech_v1.types.cloud_tts import Voice
32-
from google.cloud.texttospeech_v1.types.cloud_tts import VoiceSelectionParams
33-
from google.cloud.texttospeech_v1.types.cloud_tts import AudioEncoding
34-
from google.cloud.texttospeech_v1.types.cloud_tts import SsmlVoiceGender
35-
3637
__all__ = (
3738
"TextToSpeechClient",
3839
"TextToSpeechAsyncClient",

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/__init__.py

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

17-
from .services.text_to_speech import TextToSpeechClient
18-
from .services.text_to_speech import TextToSpeechAsyncClient
19-
20-
from .types.cloud_tts import AudioConfig
21-
from .types.cloud_tts import CustomVoiceParams
22-
from .types.cloud_tts import ListVoicesRequest
23-
from .types.cloud_tts import ListVoicesResponse
24-
from .types.cloud_tts import SynthesisInput
25-
from .types.cloud_tts import SynthesizeSpeechRequest
26-
from .types.cloud_tts import SynthesizeSpeechResponse
27-
from .types.cloud_tts import Voice
28-
from .types.cloud_tts import VoiceSelectionParams
29-
from .types.cloud_tts import AudioEncoding
30-
from .types.cloud_tts import SsmlVoiceGender
17+
from .services.text_to_speech import TextToSpeechAsyncClient, TextToSpeechClient
18+
from .types.cloud_tts import (
19+
AudioConfig,
20+
AudioEncoding,
21+
CustomVoiceParams,
22+
ListVoicesRequest,
23+
ListVoicesResponse,
24+
SsmlVoiceGender,
25+
SynthesisInput,
26+
SynthesizeSpeechRequest,
27+
SynthesizeSpeechResponse,
28+
Voice,
29+
VoiceSelectionParams,
30+
)
3131

3232
__all__ = (
3333
"TextToSpeechAsyncClient",

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/__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 TextToSpeechClient
1716
from .async_client import TextToSpeechAsyncClient
17+
from .client import TextToSpeechClient
1818

1919
__all__ = (
2020
"TextToSpeechClient",

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,25 @@
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]
3131
except AttributeError: # pragma: NO COVER
3232
OptionalRetry = Union[retries.Retry, object] # type: ignore
3333

3434
from google.cloud.texttospeech_v1.types import cloud_tts
35-
from .transports.base import TextToSpeechTransport, DEFAULT_CLIENT_INFO
36-
from .transports.grpc_asyncio import TextToSpeechGrpcAsyncIOTransport
35+
3736
from .client import TextToSpeechClient
37+
from .transports.base import DEFAULT_CLIENT_INFO, TextToSpeechTransport
38+
from .transports.grpc_asyncio import TextToSpeechGrpcAsyncIOTransport
3839

3940

4041
class TextToSpeechAsyncClient:

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,26 @@
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]
3434
except AttributeError: # pragma: NO COVER
3535
OptionalRetry = Union[retries.Retry, object] # type: ignore
3636

3737
from google.cloud.texttospeech_v1.types import cloud_tts
38-
from .transports.base import TextToSpeechTransport, DEFAULT_CLIENT_INFO
38+
39+
from .transports.base import DEFAULT_CLIENT_INFO, TextToSpeechTransport
3940
from .transports.grpc import TextToSpeechGrpcTransport
4041
from .transports.grpc_asyncio import TextToSpeechGrpcAsyncIOTransport
4142

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/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 TextToSpeechGrpcTransport
2121
from .grpc_asyncio import TextToSpeechGrpcAsyncIOTransport
2222

23-
2423
# Compile a registry of transports.
2524
_transport_registry = OrderedDict() # type: Dict[str, Type[TextToSpeechTransport]]
2625
_transport_registry["grpc"] = TextToSpeechGrpcTransport

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
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
2321
from google.api_core import gapic_v1
2422
from google.api_core import retry as retries
23+
import google.auth # type: ignore
2524
from google.auth import credentials as ga_credentials # type: ignore
2625
from google.oauth2 import service_account # type: ignore
26+
import pkg_resources
2727

2828
from google.cloud.texttospeech_v1.types import cloud_tts
2929

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/grpc.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,18 @@
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 gapic_v1
19+
from google.api_core import gapic_v1, grpc_helpers
2120
import google.auth # type: ignore
2221
from google.auth import credentials as ga_credentials # type: ignore
2322
from google.auth.transport.grpc import SslCredentials # type: ignore
24-
2523
import grpc # type: ignore
2624

2725
from google.cloud.texttospeech_v1.types import cloud_tts
28-
from .base import TextToSpeechTransport, DEFAULT_CLIENT_INFO
26+
27+
from .base import DEFAULT_CLIENT_INFO, TextToSpeechTransport
2928

3029

3130
class TextToSpeechGrpcTransport(TextToSpeechTransport):

0 commit comments

Comments
 (0)
0