Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
larkee committed Feb 19, 2021
1 parent 9dd4ab2 commit 590ea4b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/database.py
Expand Up @@ -659,7 +659,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
if self._database.log_commit_stats:
self._database.logger.info(
"CommitStats: {}".format(self._batch.commit_stats),
extra={"commit_stats": self._batch.commit_stats}
extra={"commit_stats": self._batch.commit_stats},
)
self._database._pool.put(self._session)

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/spanner_v1/session.py
Expand Up @@ -360,7 +360,7 @@ def run_in_transaction(self, func, *args, **kw):
if self._database.log_commit_stats:
self._database.logger.info(
"CommitStats: {}".format(txn.commit_stats),
extra={"commit_stats": txn.commit_stats}
extra={"commit_stats": txn.commit_stats},
)
return return_value

Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_database.py
Expand Up @@ -1375,8 +1375,7 @@ def test_context_mgr_w_commit_stats(self):
)

database.logger.info.assert_called_once_with(
"CommitStats: mutation_count: 4\n",
extra={"commit_stats": commit_stats}
"CommitStats: mutation_count: 4\n", extra={"commit_stats": commit_stats}
)

def test_context_mgr_failure(self):
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/test_session.py
Expand Up @@ -1379,11 +1379,9 @@ def unit_of_work(txn, *args, **kw):
request=request, metadata=[("google-cloud-resource-prefix", database.name)],
)
database.logger.info.assert_called_once_with(
"CommitStats: mutation_count: 4\n",
extra={"commit_stats": commit_stats}
"CommitStats: mutation_count: 4\n", extra={"commit_stats": commit_stats}
)


def test_delay_helper_w_no_delay(self):
from google.cloud.spanner_v1.session import _delay_until_retry

Expand Down

0 comments on commit 590ea4b

Please sign in to comment.