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

Skip to content

Commit bac8508

Browse files
chore(python): add nox session to sort python imports (#326)
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 6e6b224 commit bac8508

File tree

22 files changed

+163
-177
lines changed

22 files changed

+163
-177
lines changed

packages/google-cloud-bigquery-datatransfer/.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-bigquery-datatransfer/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-bigquery-datatransfer/google/cloud/bigquery_datatransfer/__init__.py

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

17-
from google.cloud.bigquery_datatransfer_v1.services.data_transfer_service.client import (
18-
DataTransferServiceClient,
19-
)
2017
from google.cloud.bigquery_datatransfer_v1.services.data_transfer_service.async_client import (
2118
DataTransferServiceAsyncClient,
2219
)
23-
24-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
25-
CheckValidCredsRequest,
20+
from google.cloud.bigquery_datatransfer_v1.services.data_transfer_service.client import (
21+
DataTransferServiceClient,
2622
)
2723
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
24+
CheckValidCredsRequest,
2825
CheckValidCredsResponse,
29-
)
30-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
3126
CreateTransferConfigRequest,
32-
)
33-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import DataSource
34-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import DataSourceParameter
35-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
27+
DataSource,
28+
DataSourceParameter,
3629
DeleteTransferConfigRequest,
37-
)
38-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
3930
DeleteTransferRunRequest,
40-
)
41-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
4231
EnrollDataSourcesRequest,
43-
)
44-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
4532
GetDataSourceRequest,
46-
)
47-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
4833
GetTransferConfigRequest,
49-
)
50-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
5134
GetTransferRunRequest,
52-
)
53-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
5435
ListDataSourcesRequest,
55-
)
56-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
5736
ListDataSourcesResponse,
58-
)
59-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
6037
ListTransferConfigsRequest,
61-
)
62-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
6338
ListTransferConfigsResponse,
64-
)
65-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
6639
ListTransferLogsRequest,
67-
)
68-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
6940
ListTransferLogsResponse,
70-
)
71-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
7241
ListTransferRunsRequest,
73-
)
74-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
7542
ListTransferRunsResponse,
76-
)
77-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
7843
ScheduleTransferRunsRequest,
79-
)
80-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
8144
ScheduleTransferRunsResponse,
82-
)
83-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
8445
StartManualTransferRunsRequest,
85-
)
86-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
8746
StartManualTransferRunsResponse,
88-
)
89-
from google.cloud.bigquery_datatransfer_v1.types.datatransfer import (
9047
UpdateTransferConfigRequest,
9148
)
92-
from google.cloud.bigquery_datatransfer_v1.types.transfer import EmailPreferences
93-
from google.cloud.bigquery_datatransfer_v1.types.transfer import ScheduleOptions
94-
from google.cloud.bigquery_datatransfer_v1.types.transfer import TransferConfig
95-
from google.cloud.bigquery_datatransfer_v1.types.transfer import TransferMessage
96-
from google.cloud.bigquery_datatransfer_v1.types.transfer import TransferRun
97-
from google.cloud.bigquery_datatransfer_v1.types.transfer import UserInfo
98-
from google.cloud.bigquery_datatransfer_v1.types.transfer import TransferState
99-
from google.cloud.bigquery_datatransfer_v1.types.transfer import TransferType
49+
from google.cloud.bigquery_datatransfer_v1.types.transfer import (
50+
EmailPreferences,
51+
ScheduleOptions,
52+
TransferConfig,
53+
TransferMessage,
54+
TransferRun,
55+
TransferState,
56+
TransferType,
57+
UserInfo,
58+
)
10059

10160
__all__ = (
10261
"DataTransferServiceClient",

packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/__init__.py

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

17-
from .services.data_transfer_service import DataTransferServiceClient
18-
from .services.data_transfer_service import DataTransferServiceAsyncClient
19-
20-
from .types.datatransfer import CheckValidCredsRequest
21-
from .types.datatransfer import CheckValidCredsResponse
22-
from .types.datatransfer import CreateTransferConfigRequest
23-
from .types.datatransfer import DataSource
24-
from .types.datatransfer import DataSourceParameter
25-
from .types.datatransfer import DeleteTransferConfigRequest
26-
from .types.datatransfer import DeleteTransferRunRequest
27-
from .types.datatransfer import EnrollDataSourcesRequest
28-
from .types.datatransfer import GetDataSourceRequest
29-
from .types.datatransfer import GetTransferConfigRequest
30-
from .types.datatransfer import GetTransferRunRequest
31-
from .types.datatransfer import ListDataSourcesRequest
32-
from .types.datatransfer import ListDataSourcesResponse
33-
from .types.datatransfer import ListTransferConfigsRequest
34-
from .types.datatransfer import ListTransferConfigsResponse
35-
from .types.datatransfer import ListTransferLogsRequest
36-
from .types.datatransfer import ListTransferLogsResponse
37-
from .types.datatransfer import ListTransferRunsRequest
38-
from .types.datatransfer import ListTransferRunsResponse
39-
from .types.datatransfer import ScheduleTransferRunsRequest
40-
from .types.datatransfer import ScheduleTransferRunsResponse
41-
from .types.datatransfer import StartManualTransferRunsRequest
42-
from .types.datatransfer import StartManualTransferRunsResponse
43-
from .types.datatransfer import UpdateTransferConfigRequest
44-
from .types.transfer import EmailPreferences
45-
from .types.transfer import ScheduleOptions
46-
from .types.transfer import TransferConfig
47-
from .types.transfer import TransferMessage
48-
from .types.transfer import TransferRun
49-
from .types.transfer import UserInfo
50-
from .types.transfer import TransferState
51-
from .types.transfer import TransferType
17+
from .services.data_transfer_service import (
18+
DataTransferServiceAsyncClient,
19+
DataTransferServiceClient,
20+
)
21+
from .types.datatransfer import (
22+
CheckValidCredsRequest,
23+
CheckValidCredsResponse,
24+
CreateTransferConfigRequest,
25+
DataSource,
26+
DataSourceParameter,
27+
DeleteTransferConfigRequest,
28+
DeleteTransferRunRequest,
29+
EnrollDataSourcesRequest,
30+
GetDataSourceRequest,
31+
GetTransferConfigRequest,
32+
GetTransferRunRequest,
33+
ListDataSourcesRequest,
34+
ListDataSourcesResponse,
35+
ListTransferConfigsRequest,
36+
ListTransferConfigsResponse,
37+
ListTransferLogsRequest,
38+
ListTransferLogsResponse,
39+
ListTransferRunsRequest,
40+
ListTransferRunsResponse,
41+
ScheduleTransferRunsRequest,
42+
ScheduleTransferRunsResponse,
43+
StartManualTransferRunsRequest,
44+
StartManualTransferRunsResponse,
45+
UpdateTransferConfigRequest,
46+ 10000
)
47+
from .types.transfer import (
48+
EmailPreferences,
49+
ScheduleOptions,
50+
TransferConfig,
51+
TransferMessage,
52+
TransferRun,
53+
TransferState,
54+
TransferType,
55+
UserInfo,
56+
)
5257

5358
__all__ = (
5459
"DataTransferServiceAsyncClient",

packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_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 DataTransferServiceClient
1716
from .async_client import DataTransferServiceAsyncClient
17+
from .client import DataTransferServiceClient
1818

1919
__all__ = (
2020
"DataTransferServiceClient",

packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,33 @@
1717
import functools
1818
import re
1919
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
20-
import pkg_resources
2120
import warnings
2221

23-
from google.api_core.client_options import ClientOptions
2422
from google.api_core import exceptions as core_exceptions
2523
from google.api_core import gapic_v1
2624
from google.api_core import retry as retries
25+
from google.api_core.client_options import ClientOptions
2726
from google.auth import credentials as ga_credentials # type: ignore
2827
from google.oauth2 import service_account # type: ignore
28+
import pkg_resources
2929

3030
try:
3131
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
3232
except AttributeError: # pragma: NO COVER
3333
OptionalRetry = Union[retries.Retry, object] # type: ignore
3434

35-
from google.cloud.bigquery_datatransfer_v1.services.data_transfer_service import pagers
36-
from google.cloud.bigquery_datatransfer_v1.types import datatransfer
37-
from google.cloud.bigquery_datatransfer_v1.types import transfer
3835
from google.protobuf import duration_pb2 # type: ignore
3936
from google.protobuf import field_mask_pb2 # type: ignore
4037
from google.protobuf import struct_pb2 # type: ignore
4138
from google.protobuf import timestamp_pb2 # type: ignore
4239
from google.rpc import status_pb2 # type: ignore
43-
from .transports.base import DataTransferServiceTransport, DEFAULT_CLIENT_INFO
44-
from .transports.grpc_asyncio import DataTransferServiceGrpcAsyncIOTransport
40+
41+
from google.cloud.bigquery_datatransfer_v1.services.data_transfer_service import pagers
42+
from google.cloud.bigquery_datatransfer_v1.types import datatransfer, transfer
43+
4544
from .client import DataTransferServiceClient
45+
from .transports.base import DEFAULT_CLIENT_INFO, DataTransferServiceTransport
46+
from .transports.grpc_asyncio import DataTransferServiceGrpcAsyncIOTransport
4647

4748

4849
class DataTransferServiceAsyncClient:

packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py

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

2322
from google.api_core import client_options as client_options_lib
2423
from google.api_core import exceptions as core_exceptions
2524
from google.api_core import gapic_v1
2625
from google.api_core import retry as retries
2726
from google.auth import credentials as ga_credentials # type: ignore
27+
from google.auth.exceptions import MutualTLSChannelError # type: ignore
2828
from google.auth.transport import mtls # type: ignore
2929
from google.auth.transport.grpc import SslCredentials # type: ignore
30-
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3130
from google.oauth2 import service_account # type: ignore
31+
import pkg_resources
3232

3333
try:
3434
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
3535
except AttributeError: # pragma: NO COVER
3636
OptionalRetry = Union[retries.Retry, object] # type: ignore
3737

38-
from google.cloud.bigquery_datatransfer_v1.services.data_transfer_service import pagers
39-
from google.cloud.bigquery_datatransfer_v1.types import datatransfer
40-
from google.cloud.bigquery_datatransfer_v1.types import transfer
4138
from google.protobuf import duration_pb2 # type: ignore
4239
from google.protobuf import field_mask_pb2 # type: ignore
4340
from google.protobuf import struct_pb2 # type: ignore
4441
from google.protobuf import timestamp_pb2 # type: ignore
4542
from google.rpc import status_pb2 # type: ignore
46-
from .transports.base import DataTransferServiceTransport, DEFAULT_CLIENT_INFO
43+
44+
from google.cloud.bigquery_datatransfer_v1.services.data_transfer_service import pagers
45+
from google.cloud.bigquery_datatransfer_v1.types import datatransfer, transfer
46+
47+
from .transports.base import DEFAULT_CLIENT_INFO, DataTransferServiceTransport
4748
from .transports.grpc import DataTransferServiceGrpcTransport
4849
from .transports.grpc_asyncio import DataTransferServiceGrpcAsyncIOTransport
4950

packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/pagers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
AsyncIterator,
1919
Awaitable,
2020
Callable,
21+
Iterator,
22+
Optional,
2123
Sequence,
2224
Tuple,
23-
Optional,
24-
Iterator,
2525
)
2626

27-
from google.cloud.bigquery_datatransfer_v1.types import datatransfer
28-
from google.cloud.bigquery_datatransfer_v1.types import transfer
27+
from google.cloud.bigquery_datatransfer_v1.types import datatransfer, transfer
2928

3029

3130
class ListDataSourcesPager:

packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_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 DataTransferServiceGrpcTransport
2121
from .grpc_asyncio import DataTransferServiceGrpcAsyncIOTransport
2222

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

packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_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
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
27-
28-
from google.cloud.bigquery_datatransfer_v1.types import datatransfer
29-
from google.cloud.bigquery_datatransfer_v1.types import transfer
3026
from google.protobuf import empty_pb2 # type: ignore
27+
import pkg_resources
28+
29+
from google.cloud.bigquery_datatransfer_v1.types import datatransfer, transfer
3130

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

0 commit comments

Comments
 (0)
0