Skip to content

Commit 3cf88ce

Browse files
authored
blacken all gen'd libs (#6792)
* blacken all gen'd libs
1 parent b345329 commit 3cf88ce

File tree

10 files changed

+4062
-2653
lines changed

10 files changed

+4062
-2653
lines changed

packages/google-cloud-datastore/google/cloud/datastore_v1/gapic/datastore_client.py

Lines changed: 181 additions & 165 deletions
Large diffs are not rendered by default.

packages/google-cloud-datastore/google/cloud/datastore_v1/gapic/datastore_client_config.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"google.datastore.v1.Datastore": {
44
"retry_codes": {
55
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
6-
"non_idempotent": []
6+
"non_idempotent": [],
77
},
88
"retry_params": {
99
"default": {
@@ -13,46 +13,46 @@
1313
"initial_rpc_timeout_millis": 60000,
1414
"rpc_timeout_multiplier": 1.0,
1515
"max_rpc_timeout_millis": 60000,
16-
"total_timeout_millis": 600000
16+
"total_timeout_millis": 600000,
1717
}
1818
},
1919
"methods": {
2020
"Lookup": {
2121
"timeout_millis": 60000,
2222
"retry_codes_name": "idempotent",
23-
"retry_params_name": "default"
23+
"retry_params_name": "default",
2424
},
2525
"RunQuery": {
2626
"timeout_millis": 60000,
2727
"retry_codes_name": "idempotent",
28-
"retry_params_name": "default"
28+
"retry_params_name": "default",
2929
},
3030
"BeginTransaction": {
3131
"timeout_millis": 60000,
3232
"retry_codes_name": "non_idempotent",
33-
"retry_params_name": "default"
33+
"retry_params_name": "default",
3434
},
3535
"Commit": {
3636
"timeout_millis": 60000,
3737
"retry_codes_name": "non_idempotent",
38-
"retry_params_name": "default"
38+
"retry_params_name": "default",
3939
},
4040
"Rollback": {
4141
"timeout_millis": 60000,
4242
"retry_codes_name": "non_idempotent",
43-
"retry_params_name": "default"
43+
"retry_params_name": "default",
4444
},
4545
"AllocateIds": {
4646
"timeout_millis": 60000,
4747
"retry_codes_name": "non_idempotent",
48-
"retry_params_name": "default"
48+
"retry_params_name": "default",
4949
},
5050
"ReserveIds": {
5151
"timeout_millis": 60000,
5252
"retry_codes_name": "idempotent",
53-
"retry_params_name": "default"
54-
}
55-
}
53+
"retry_params_name": "default",
54+
},
55+
},
5656
}
5757
}
5858
}

packages/google-cloud-datastore/google/cloud/datastore_v1/gapic/enums.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class NullValue(enum.IntEnum):
2828
Attributes:
2929
NULL_VALUE (int): Null value.
3030
"""
31+
3132
NULL_VALUE = 0
3233

3334

@@ -47,6 +48,7 @@ class ResultType(enum.IntEnum):
4748
PROJECTION (int): A projected subset of properties. The entity may have no key.
4849
KEY_ONLY (int): Only the key.
4950
"""
51+
5052
RESULT_TYPE_UNSPECIFIED = 0
5153
FULL = 1
5254
PROJECTION = 2
@@ -63,6 +65,7 @@ class Direction(enum.IntEnum):
6365
ASCENDING (int): Ascending.
6466
DESCENDING (int): Descending.
6567
"""
68+
6669
DIRECTION_UNSPECIFIED = 0
6770
ASCENDING = 1
6871
DESCENDING = 2
@@ -77,6 +80,7 @@ class Operator(enum.IntEnum):
7780
OPERATOR_UNSPECIFIED (int): Unspecified. This value must not be used.
7881
AND (int): The results are required to satisfy each of the combined filters.
7982
"""
83+
8084
OPERATOR_UNSPECIFIED = 0
8185
AND = 1
8286

@@ -95,6 +99,7 @@ class Operator(enum.IntEnum):
9599
EQUAL (int): Equal.
96100
HAS_ANCESTOR (int): Has ancestor.
97101
"""
102+
98103
OPERATOR_UNSPECIFIED = 0
99104
LESS_THAN = 1
100105
LESS_THAN_OR_EQUAL = 2
@@ -117,6 +122,7 @@ class MoreResultsType(enum.IntEnum):
117122
cursor.
118123
NO_MORE_RESULTS (int): The query is finished, and there are no more results.
119124
"""
125+
120126
MORE_RESULTS_TYPE_UNSPECIFIED = 0
121127
NOT_FINISHED = 1
122128
MORE_RESULTS_AFTER_LIMIT = 2
@@ -136,6 +142,7 @@ class Mode(enum.IntEnum):
136142
`here <https://cloud.google.com/datastore/docs/concepts/transactions>`__.
137143
NON_TRANSACTIONAL (int): Non-transactional: The mutations may not apply as all or none.
138144
"""
145+
139146
MODE_UNSPECIFIED = 0
140147
TRANSACTIONAL = 1
141148
NON_TRANSACTIONAL = 2
@@ -151,6 +158,7 @@ class ReadConsistency(enum.IntEnum):
151158
STRONG (int): Strong consistency.
152159
EVENTUAL (int): Eventual consistency.
153160
"""
161+
154162
READ_CONSISTENCY_UNSPECIFIED = 0
155163
STRONG = 1
156164
EVENTUAL = 2

packages/google-cloud-datastore/google/cloud/datastore_v1/gapic/transports/datastore_grpc_transport.py

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ class DatastoreGrpcTransport(object):
2727
which can be used to take advantage of advanced
2828
features of gRPC.
2929
"""
30+
3031
# The scopes needed to make gRPC calls to all of the methods defined
3132
# in this service.
3233
_OAUTH_SCOPES = (
33-
'https://www.googleapis.com/auth/cloud-platform',
34-
'https://www.googleapis.com/auth/datastore',
34+
"https://www.googleapis.com/auth/cloud-platform",
35+
"https://www.googleapis.com/auth/datastore",
3536
)
3637

37-
def __init__(self,
38-
channel=None,
39-
credentials=None,
40-
address='datastore.googleapis.com:443'):
38+
def __init__(
39+
self, channel=None, credentials=None, address="datastore.googleapis.com:443"
40+
):
4141
"""Instantiate the transport class.
4242
4343
Args:
@@ -55,28 +55,21 @@ def __init__(self,
5555
# exception (channels come with credentials baked in already).
5656
if channel is not None and credentials is not None:
5757
raise ValueError(
58-
'The `channel` and `credentials` arguments are mutually '
59-
'exclusive.', )
58+
"The `channel` and `credentials` arguments are mutually " "exclusive."
59+
)
6060

6161
# Create the channel.
6262
if channel is None:
63-
channel = self.create_channel(
64-
address=address,
65-
credentials=credentials,
66-
)
63+
channel = self.create_channel(address=address, credentials=credentials)
6764

6865
self._channel = channel
6966

7067
# gRPC uses objects called "stubs" that are bound to the
7168
# channel and provide a basic method for each RPC.
72-
self._stubs = {
73-
'datastore_stub': datastore_pb2_grpc.DatastoreStub(channel),
74-
}
69+
self._stubs = {"datastore_stub": datastore_pb2_grpc.DatastoreStub(channel)}
7570

7671
@classmethod
77-
def create_channel(cls,
78-
address='datastore.googleapis.com:443',
79-
credentials=None):
72+
def create_channel(cls, address="datastore.googleapis.com:443", credentials=None):
8073
"""Create and return a gRPC channel object.
8174
8275
Args:
@@ -91,9 +84,7 @@ def create_channel(cls,
9184
grpc.Channel: A gRPC channel object.
9285
"""
9386
return google.api_core.grpc_helpers.create_channel(
94-
address,
95-
credentials=credentials,
96-
scopes=cls._OAUTH_SCOPES,
87+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
9788
)
9889

9990
@property
@@ -116,7 +107,7 @@ def lookup(self):
116107
deserialized request object and returns a
117108
deserialized response object.
118109
"""
119-
return self._stubs['datastore_stub'].Lookup
110+
return self._stubs["datastore_stub"].Lookup
120111

121112
@property
122113
def run_query(self):
@@ -129,7 +120,7 @@ def run_query(self):
129120
deserialized request object and returns a
130121
deserialized response object.
131122
"""
132-
return self._stubs['datastore_stub'].RunQuery
123+
return self._stubs["datastore_stub"].RunQuery
133124

134125
@property
135126
def begin_transaction(self):
@@ -142,7 +133,7 @@ def begin_transaction(self):
142133
deserialized request object and returns a
143134
deserialized response object.
144135
"""
145-
return self._stubs['datastore_stub'].BeginTransaction
136+
return self._stubs["datastore_stub"].BeginTransaction
146137

147138
@property
148139
def commit(self):
@@ -156,7 +147,7 @@ def commit(self):
156147
deserialized request object and returns a
157148
deserialized response object.
158149
"""
159-
return self._stubs['datastore_stub'].Commit
150+
return self._stubs["datastore_stub"].Commit
160151

161152
@property
162153
def rollback(self):
@@ -169,7 +160,7 @@ def rollback(self):
169160
deserialized request object and returns a
170161
deserialized response object.
171162
"""
172-
return self._stubs['datastore_stub'].Rollback
163+
return self._stubs["datastore_stub"].Rollback
173164

174165
@property
175166
def allocate_ids(self):
@@ -183,7 +174,7 @@ def allocate_ids(self):
183174
deserialized request object and returns a
184175
deserialized response object.
185176
"""
186-
return self._stubs['datastore_stub'].AllocateIds
177+
return self._stubs["datastore_stub"].AllocateIds
187178

188179
@property
189180
def reserve_ids(self):
@@ -197,4 +188,4 @@ def reserve_ids(self):
197188
deserialized request object and returns a
198189
deserialized response object.
199190
"""
200-
return self._stubs['datastore_stub'].ReserveIds
191+
return self._stubs["datastore_stub"].ReserveIds

0 commit comments

Comments
 (0)