Skip to content

Commit cca968d

Browse files
authored
Updates for pycodestyle. (#2973)
1 parent 15b554b commit cca968d

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/google-cloud-datastore/google/cloud/datastore/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def begin(self):
186186
try:
187187
self._id = self._client._connection.begin_transaction(
188188
self.project)
189-
except:
189+
except: # noqa: E722 do not use bare except, specify exception instead
190190
self._status = self._ABORTED
191191
raise
192192

packages/google-cloud-datastore/unit_tests/test__http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,11 +1051,11 @@ def test_allocate_ids_non_empty(self):
10511051
before_key_pbs = [
10521052
self._make_key_pb(PROJECT, id_=None),
10531053
self._make_key_pb(PROJECT, id_=None),
1054-
]
1054+
]
10551055
after_key_pbs = [
10561056
self._make_key_pb(PROJECT),
10571057
self._make_key_pb(PROJECT, id_=2345),
1058-
]
1058+
]
10591059
rsp_pb = datastore_pb2.AllocateIdsResponse()
10601060
rsp_pb.keys.add().CopyFrom(after_key_pbs[0])
10611061
rsp_pb.keys.add().CopyFrom(after_key_pbs[1])

packages/google-cloud-datastore/unit_tests/test_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_put_entity_w_completed_key(self):
121121
'baz': 'qux',
122122
'spam': [1, 2, 3],
123123
'frotz': [], # will be ignored
124-
}
124+
}
125125
connection = _Connection()
126126
client = _Client(_PROJECT, connection)
127127
batch = self._make_one(client)

packages/google-cloud-datastore/unit_tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def test_query_explicit(self):
853853
projection=PROJECTION,
854854
order=ORDER,
855855
distinct_on=DISTINCT_ON,
856-
)
856+
)
857857

858858
self.assertIsInstance(query, _Dummy)
859859
self.assertEqual(query.args, (client,))

packages/google-cloud-datastore/unit_tests/test_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_ctor_explicit(self):
6868
projection=PROJECTION,
6969
order=ORDER,
7070
distinct_on=DISTINCT_ON,
71-
)
71+
)
7272
self.assertIs(query._client, client)
7373
self.assertEqual(query.project, _PROJECT)
7474
self.assertEqual(query.kind, _KIND)

0 commit comments

Comments
 (0)