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

Skip to content

Commit 3e0b105

Browse files
authored
Merge pull request googleapis#3039 from daspecster/formatting-style-part-1
Spanner, BigQuery, Core, Error Reporting, Logging formatting style updates.
2 parents c79fc92 + d675b06 commit 3e0b105

File tree

22 files changed

+578
-332
lines changed

22 files changed

+578
-332
lines changed

bigquery/unit_tests/test__helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ def test_w_non_bytes(self):
556556

557557
def test_w_bytes(self):
558558
import base64
559+
559560
source = b'source'
560561
expected = base64.encodestring(source)
561562
self.assertEqual(self._call_fut(source), expected)

bigquery/unit_tests/test_table.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,7 @@ def test_upload_from_file_multipart_w_400(self):
15361536
from google.cloud._testing import _NamedTemporaryFile
15371537
from google.cloud._helpers import UTC
15381538
from google.cloud.exceptions import BadRequest
1539+
15391540
WHEN_TS = 1437767599.006
15401541
WHEN = datetime.datetime.utcfromtimestamp(WHEN_TS).replace(
15411542
tzinfo=UTC)

core/unit_tests/test__helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ class Test__name_from_project_path(unittest.TestCase):
669669

670670
def _call_fut(self, path, project, template):
671671
from google.cloud._helpers import _name_from_project_path
672+
672673
return _name_from_project_path(path, project, template)
673674

674675
def test_w_invalid_path_length(self):

error_reporting/unit_tests/test__gax.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class Test_make_report_error_api(unittest.TestCase):
2121

2222
def test_make_report_error_api(self):
2323
from google.cloud.error_reporting._gax import make_report_error_api
24+
2425
client = mock.Mock()
2526
client.project = mock.Mock()
2627
report_error_client = make_report_error_api(client)
@@ -33,6 +34,7 @@ class Test_ErrorReportingGaxApi(unittest.TestCase):
3334

3435
def _call_fut(self, gax_api, project):
3536
from google.cloud.error_reporting._gax import _ErrorReportingGaxApi
37+
3638
return _ErrorReportingGaxApi(gax_api, project)
3739

3840
def test_constructor(self):

error_reporting/unit_tests/test__logging.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
def _make_credentials():
2121
import google.auth.credentials
22+
2223
return mock.Mock(spec=google.auth.credentials.Credentials)
2324

2425

@@ -31,6 +32,7 @@ class Test_ErrorReportingLoggingAPI(unittest.TestCase):
3132
def _call_fut(self, project, credentials):
3233
from google.cloud.error_reporting._logging import (
3334
_ErrorReportingLoggingAPI)
35+
3436
return _ErrorReportingLoggingAPI(project, credentials)
3537

3638
def test_constructor(self):

error_reporting/unit_tests/test_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ def test_report_exception_wo_gax(self):
108108

109109
@mock.patch('google.cloud.error_reporting.client.make_report_error_api')
110110
def test_report_exception_with_service_version_in_constructor(
111-
self,
112-
make_client):
111+
self, make_client):
113112
CREDENTIALS = _make_credentials()
114113
SERVICE = "notdefault"
115114
VERSION = "notdefaultversion"

logging/unit_tests/handlers/test_handlers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TestCloudLoggingHandler(unittest.TestCase):
2323
@staticmethod
2424
def _get_target_class():
2525
from google.cloud.logging.handlers.handlers import CloudLoggingHandler
26+
2627
return CloudLoggingHandler
2728

2829
def _make_one(self, *args, **kw):
@@ -49,6 +50,7 @@ class TestSetupLogging(unittest.TestCase):
4950

5051
def _call_fut(self, handler, excludes=None):
5152
from google.cloud.logging.handlers.handlers import setup_logging
53+
5254
if excludes:
5355
return setup_logging(handler, excluded_loggers=excludes)
5456
else:

logging/unit_tests/handlers/transports/test_background_thread.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class TestBackgroundThreadHandler(unittest.TestCase):
2525
def _get_target_class():
2626
from google.cloud.logging.handlers.transports import (
2727
BackgroundThreadTransport)
28+
2829
return BackgroundThreadTransport
2930

3031
def _make_one(self, *args, **kw):
@@ -62,6 +63,7 @@ class TestWorker(unittest.TestCase):
6263
@staticmethod
6364
def _get_target_class():
6465
from google.cloud.logging.handlers.transports import background_thread
66+
6567
return background_thread._Worker
6668

6769
def _make_one(self, *args, **kw):

logging/unit_tests/handlers/transports/test_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class TestBaseHandler(unittest.TestCase):
2222
@staticmethod
2323
def _get_target_class():
2424
from google.cloud.logging.handlers.transports import Transport
25+
2526
return Transport
2627

2728
def _make_one(self, *args, **kw):

logging/unit_tests/handlers/transports/test_sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TestSyncHandler(unittest.TestCase):
2323
@staticmethod
2424
def _get_target_class():
2525
from google.cloud.logging.handlers.transports import SyncTransport
26+
2627
return SyncTransport
2728

2829
def _make_one(self, *args, **kw):

0 commit comments

Comments
 (0)