Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ec3865

Browse files
committed
Updates for pycodestyle.
1 parent 3584917 commit 6ec3865

File tree

14 files changed

+16
-10
lines changed

14 files changed

+16
-10
lines changed

bigquery/unit_tests/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ def api_request(self, **kw):
838838

839839
try:
840840
response, self._responses = self._responses[0], self._responses[1:]
841-
except:
841+
except Exception:
842842
raise NotFound('miss')
843843
else:
844844
return response

bigquery/unit_tests/test_job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ def api_request(self, **kw):
19041904

19051905
try:
19061906
response, self._responses = self._responses[0], self._responses[1:]
1907-
except:
1907+
except Exception:
19081908
raise NotFound('miss')
19091909
else:
19101910
return response

bigquery/unit_tests/test_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ def api_request(self, **kw):
19891989

19901990
try:
19911991
response, self._responses = self._responses[0], self._responses[1:]
1992-
except:
1992+
except Exception:
19931993
raise NotFound('miss')
19941994
else:
19951995
return response

core/unit_tests/test__helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,14 @@ def _call_fut(self, project=None):
138138
return _determine_default_project(project=project)
139139

140140
def test_it(self):
141+
141142
with mock.patch('google.auth.default', autospec=True) as default:
142143
default.return_value = (
143144
mock.sentinel.credentials, mock.sentinel.project)
144145
project = self._call_fut()
145146

146147
self.assertEqual(project, mock.sentinel.project)
148+
147149
default.assert_called_once_with()
148150

149151
def test_explicit(self):

core/unit_tests/test_credentials.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def test_it(self):
3131
found = self._call_fut()
3232

3333
self.assertIs(found, mock.sentinel.credentials)
34+
3435
default.assert_called_once_with()
3536

3637

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 Exception:
190190
self._status = self._ABORTED
191191
raise
192192

datastore/unit_tests/test_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def test_ctor_w_project_no_environ(self):
156156
def test_ctor_w_implicit_inputs(self):
157157
OTHER = 'other'
158158
creds = _make_credentials()
159+
159160
default_called = []
160161

161162
def fallback_mock(project):
@@ -515,6 +516,7 @@ def test_get_multi_max_loops(self):
515516
client._connection._add_lookup_result([entity_pb])
516517

517518
key = Key(KIND, ID, project=self.PROJECT)
519+
518520
deferred = []
519521
missing = []
520522

dns/unit_tests/test_changes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def api_request(self, **kw):
347347

348348
try:
349349
response, self._responses = self._responses[0], self._responses[1:]
350-
except:
350+
except Exception:
351351
raise NotFound('miss')
352352
else:
353353
return response

dns/unit_tests/test_zone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def api_request(self, **kw):
693693

694694
try:
695695
response, self._responses = self._responses[0], self._responses[1:]
696-
except:
696+
except Exception:
697697
raise NotFound('miss')
698698
else:
699699
return response

resource_manager/unit_tests/test_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def api_request(self, **kw):
362362

363363
try:
364364
response, self._responses = self._responses[0], self._responses[1:]
365-
except:
365+
except Exception:
366366
raise NotFound('miss')
367367
else:
368368
return response

0 commit comments

Comments
 (0)