Skip to content

Commit b953a34

Browse files
committed
chore: updates formatting
1 parent 8d6c0d6 commit b953a34

File tree

132 files changed

+1089
-941
lines changed

Some content is hidden

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

132 files changed

+1089
-941
lines changed

packages/google-cloud-spanner/google/cloud/aio/_cross_sync/_decorators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Contains a set of AstDecorator classes, which define the behavior of CrossSync decorators.
1616
Each AstDecorator class is used through @CrossSync.<decorator_name>
1717
"""
18+
1819
from __future__ import annotations
1920

2021
from typing import TYPE_CHECKING, Iterable

packages/google-cloud-spanner/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from collections import OrderedDict
1716
import logging as std_logging
1817
import re
18+
import uuid
19+
from collections import OrderedDict
1920
from typing import (
2021
Callable,
2122
Dict,
@@ -28,15 +29,14 @@
2829
Type,
2930
Union,
3031
)
31-
import uuid
3232

33+
import google.protobuf
3334
from google.api_core import exceptions as core_exceptions
3435
from google.api_core import gapic_v1
3536
from google.api_core import retry_async as retries
3637
from google.api_core.client_options import ClientOptions
3738
from google.auth import credentials as ga_credentials # type: ignore
3839
from google.oauth2 import service_account # type: ignore
39-
import google.protobuf
4040

4141
from google.cloud.spanner_admin_database_v1 import gapic_version as package_version
4242

@@ -45,24 +45,33 @@
4545
except AttributeError: # pragma: NO COVER
4646
OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
4747

48-
from google.api_core import operation # type: ignore
49-
from google.api_core import operation_async # type: ignore
50-
from google.iam.v1 import iam_policy_pb2 # type: ignore
51-
from google.iam.v1 import policy_pb2 # type: ignore
48+
from google.api_core import (
49+
operation, # type: ignore
50+
operation_async, # type: ignore
51+
)
52+
from google.iam.v1 import (
53+
iam_policy_pb2, # type: ignore
54+
policy_pb2, # type: ignore
55+
)
5256
from google.longrunning import operations_pb2 # type: ignore
53-
from google.protobuf import duration_pb2 # type: ignore
54-
from google.protobuf import empty_pb2 # type: ignore
55-
from google.protobuf import field_mask_pb2 # type: ignore
56-
from google.protobuf import timestamp_pb2 # type: ignore
57+
from google.protobuf import (
58+
duration_pb2, # type: ignore
59+
empty_pb2, # type: ignore
60+
field_mask_pb2, # type: ignore
61+
timestamp_pb2, # type: ignore
62+
)
5763

5864
from google.cloud.spanner_admin_database_v1.services.database_admin import pagers
59-
from google.cloud.spanner_admin_database_v1.types import common, spanner_database_admin
6065
from google.cloud.spanner_admin_database_v1.types import (
61-
backup_schedule as gsad_backup_schedule,
66+
backup,
67+
backup_schedule,
68+
common,
69+
spanner_database_admin,
6270
)
63-
from google.cloud.spanner_admin_database_v1.types import backup
6471
from google.cloud.spanner_admin_database_v1.types import backup as gsad_backup
65-
from google.cloud.spanner_admin_database_v1.types import backup_schedule
72+
from google.cloud.spanner_admin_database_v1.types import (
73+
backup_schedule as gsad_backup_schedule,
74+
)
6675

6776
from .client import DatabaseAdminClient
6877
from .transports.base import DEFAULT_CLIENT_INFO, DatabaseAdminTransport
@@ -160,7 +169,9 @@ def from_service_account_info(cls, info: dict, *args, **kwargs):
160169
Returns:
161170
DatabaseAdminAsyncClient: The constructed client.
162171
"""
163-
return DatabaseAdminClient.from_service_account_info.__func__(DatabaseAdminAsyncClient, info, *args, **kwargs) # type: ignore
172+
return DatabaseAdminClient.from_service_account_info.__func__(
173+
DatabaseAdminAsyncClient, info, *args, **kwargs
174+
) # type: ignore
164175

165176
@classmethod
166177
def from_service_account_file(cls, filename: str, *args, **kwargs):
@@ -176,7 +187,9 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
176187
Returns:
177188
DatabaseAdminAsyncClient: The constructed client.
178189
"""
179-
return DatabaseAdminClient.from_service_account_file.__func__(DatabaseAdminAsyncClient, filename, *args, **kwargs) # type: ignore
190+
return DatabaseAdminClient.from_service_account_file.__func__(
191+
DatabaseAdminAsyncClient, filename, *args, **kwargs
192+
) # type: ignore
180193

181194
from_service_account_json = from_service_account_file
182195

packages/google-cloud-spanner/google/cloud/spanner_admin_database_v1/services/database_admin/client.py

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from collections import OrderedDict
17-
from http import HTTPStatus
1816
import json
1917
import logging as std_logging
2018
import os
2119
import re
20+
import uuid
21+
import warnings
22+
from collections import OrderedDict
23+
from http import HTTPStatus
2224
from typing import (
2325
Callable,
2426
Dict,
@@ -32,9 +34,8 @@
3234
Union,
3335
cast,
3436
)
35-
import uuid
36-
import warnings
3737

38+
import google.protobuf
3839
from google.api_core import client_options as client_options_lib
3940
from google.api_core import exceptions as core_exceptions
4041
from google.api_core import gapic_v1
@@ -44,7 +45,6 @@
4445
from google.auth.transport import mtls # type: ignore
4546
from google.auth.transport.grpc import SslCredentials # type: ignore
4647
from google.oauth2 import service_account # type: ignore
47-
import google.protobuf
4848

4949
from google.cloud.spanner_admin_database_v1 import gapic_version as package_version
5050

@@ -62,24 +62,33 @@
6262

6363
_LOGGER = std_logging.getLogger(__name__)
6464

65-
from google.api_core import operation # type: ignore
66-
from google.api_core import operation_async # type: ignore
67-
from google.iam.v1 import iam_policy_pb2 # type: ignore
68-
from google.iam.v1 import policy_pb2 # type: ignore
65+
from google.api_core import (
66+
operation, # type: ignore
67+
operation_async, # type: ignore
68+
)
69+
from google.iam.v1 import (
70+
iam_policy_pb2, # type: ignore
71+
policy_pb2, # type: ignore
72+
)
6973
from google.longrunning import operations_pb2 # type: ignore
70-
from google.protobuf import duration_pb2 # type: ignore
71-
from google.protobuf import empty_pb2 # type: ignore
72-
from google.protobuf import field_mask_pb2 # type: ignore
73-
from google.protobuf import timestamp_pb2 # type: ignore
74+
from google.protobuf import (
75+
duration_pb2, # type: ignore
76+
empty_pb2, # type: ignore
77+
field_mask_pb2, # type: ignore
78+
timestamp_pb2, # type: ignore
79+
)
7480

7581
from google.cloud.spanner_admin_database_v1.services.database_admin import pagers
76-
from google.cloud.spanner_admin_database_v1.types import common, spanner_database_admin
7782
from google.cloud.spanner_admin_database_v1.types import (
78-
backup_schedule as gsad_backup_schedule,
83+
backup,
84+
backup_schedule,
85+
common,
86+
spanner_database_admin,
7987
)
80-
from google.cloud.spanner_admin_database_v1.types import backup
8188
from google.cloud.spanner_admin_database_v1.types import backup as gsad_backup
82-
from google.cloud.spanner_admin_database_v1.types import backup_schedule
89+
from google.cloud.spanner_admin_database_v1.types import (
90+
backup_schedule as gsad_backup_schedule,
91+
)
8392

8493
from .transports.base import DEFAULT_CLIENT_INFO, DatabaseAdminTransport
8594
from .transports.grpc import DatabaseAdminGrpcTransport
@@ -841,8 +850,7 @@ def __init__(
841850
)
842851
if self._client_options.scopes:
843852
raise ValueError(
844-
"When providing a transport instance, provide its scopes "
845-
"directly."
853+
"When providing a transport instance, provide its scopes directly."
846854
)
847855
self._transport = cast(DatabaseAdminTransport, transport)
848856
self._api_endpoint = self._transport.host

packages/google-cloud-spanner/google/cloud/spanner_admin_database_v1/services/database_admin/pagers.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(
7373
*,
7474
retry: OptionalRetry = gapic_v1.method.DEFAULT,
7575
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
76-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
76+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
7777
):
7878
"""Instantiate the pager.
7979
@@ -149,7 +149,7 @@ def __init__(
149149
*,
150150
retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
151151
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
152-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
152+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
153153
):
154154
"""Instantiates the pager.
155155
@@ -231,7 +231,7 @@ def __init__(
231231
*,
232232
retry: OptionalRetry = gapic_v1.method.DEFAULT,
233233
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
234-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
234+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
235235
):
236236
"""Instantiate the pager.
237237
@@ -307,7 +307,7 @@ def __init__(
307307
*,
308308
retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
309309
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
310-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
310+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
311311
):
312312
"""Instantiates the pager.
313313
@@ -387,7 +387,7 @@ def __init__(
387387
*,
388388
retry: OptionalRetry = gapic_v1.method.DEFAULT,
389389
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
390-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
390+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
391391
):
392392
"""Instantiate the pager.
393393
@@ -465,7 +465,7 @@ def __init__(
465465
*,
466466
retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
467467
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
468-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
468+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
469469
):
470470
"""Instantiates the pager.
471471
@@ -547,7 +547,7 @@ def __init__(
547547
*,
548548
retry: OptionalRetry = gapic_v1.method.DEFAULT,
549549
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
550-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
550+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
551551
):
552552
"""Instantiate the pager.
553553
@@ -623,7 +623,7 @@ def __init__(
623623
*,
624624
retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
625625
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
626-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
626+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
627627
):
628628
"""Instantiates the pager.
629629
@@ -703,7 +703,7 @@ def __init__(
703703
*,
704704
retry: OptionalRetry = gapic_v1.method.DEFAULT,
705705
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
706-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
706+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
707707
):
708708
"""Instantiate the pager.
709709
@@ -781,7 +781,7 @@ def __init__(
781781
*,
782782
retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
783783
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
784-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
784+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
785785
):
786786
"""Instantiates the pager.
787787
@@ -863,7 +863,7 @@ def __init__(
863863
*,
864864
retry: OptionalRetry = gapic_v1.method.DEFAULT,
865865
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
866-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
866+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
867867
):
868868
"""Instantiate the pager.
869869
@@ -939,7 +939,7 @@ def __init__(
939939
*,
940940
retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
941941
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
942-
metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
942+
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
943943
):
944944
"""Instantiates the pager.
945945

packages/google-cloud-spanner/google/cloud/spanner_admin_database_v1/services/database_admin/transports/base.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,30 @@
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
1818

1919
import google.api_core
20+
import google.auth # type: ignore
21+
import google.protobuf
2022
from google.api_core import exceptions as core_exceptions
2123
from google.api_core import gapic_v1, operations_v1
2224
from google.api_core import retry as retries
23-
import google.auth # type: ignore
2425
from google.auth import credentials as ga_credentials # type: ignore
25-
from google.iam.v1 import iam_policy_pb2 # type: ignore
26-
from google.iam.v1 import policy_pb2 # type: ignore
26+
from google.iam.v1 import (
27+
iam_policy_pb2, # type: ignore
28+
policy_pb2, # type: ignore
29+
)
2730
from google.longrunning import operations_pb2 # type: ignore
2831
from google.oauth2 import service_account # type: ignore
29-
import google.protobuf
3032
from google.protobuf import empty_pb2 # type: ignore
3133

3234
from google.cloud.spanner_admin_database_v1 import gapic_version as package_version
3335
from google.cloud.spanner_admin_database_v1.types import (
34-
backup_schedule as gsad_backup_schedule,
36+
backup,
37+
backup_schedule,
38+
spanner_database_admin,
3539
)
36-
from google.cloud.spanner_admin_database_v1.types import backup
3740
from google.cloud.spanner_admin_database_v1.types import backup as gsad_backup
38-
from google.cloud.spanner_admin_database_v1.types import backup_schedule
39-
from google.cloud.spanner_admin_database_v1.types import spanner_database_admin
41+
from google.cloud.spanner_admin_database_v1.types import (
42+
backup_schedule as gsad_backup_schedule,
43+
)
4044

4145
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
4246
gapic_version=package_version.__version__
@@ -819,13 +823,19 @@ def get_operation(
819823
@property
820824
def cancel_operation(
821825
self,
822-
) -> Callable[[operations_pb2.CancelOperationRequest], None,]:
826+
) -> Callable[
827+
[operations_pb2.CancelOperationRequest],
828+
None,
829+
]:
823830
raise NotImplementedError()
824831

825832
@property
826833
def delete_operation(
827834
self,
828-
) -> Callable[[operations_pb2.DeleteOperationRequest], None,]:
835+
) -> Callable[
836+
[operations_pb2.DeleteOperationRequest],
837+
None,
838+
]:
829839
raise NotImplementedError()
830840

831841
@property

0 commit comments

Comments
 (0)