@@ -271,7 +271,10 @@ def test_add_response_metadata_cbt_header(
271271 cls = type (self ._make_one (mock .Mock ()))
272272 with mock .patch .object (cls , "_handle_error" ) as mock_handle_error :
273273 metric = self ._make_one (
274- mock .Mock (), cluster_id = start_cluster , zone = start_zone , state = State .ACTIVE_ATTEMPT
274+ mock .Mock (),
275+ cluster_id = start_cluster ,
276+ zone = start_zone ,
277+ state = State .ACTIVE_ATTEMPT ,
275278 )
276279 metric .active_attempt = mock .Mock ()
277280 metric .active_attempt .gfe_latency_ns = None
@@ -391,7 +394,6 @@ def test_end_attempt_with_status(self, mock_monotonic_ns):
391394 expected_gfe_latency_ns = 5
392395 expected_app_blocking = 12
393396 expected_backoff = 2
394- expected_grpc_throttle = 3
395397 handlers = [mock .Mock (), mock .Mock ()]
396398
397399 metric = self ._make_one (mock .Mock (), handlers = handlers )
@@ -450,7 +452,10 @@ def test_end_attempt_with_negative_duration_ns(self, mock_monotonic_ns):
450452 metric .end_attempt_with_status (mock .Mock ())
451453
452454 assert mock_handle_error .call_count == 1
453- assert "received negative value for duration" in mock_handle_error .call_args [0 ][0 ]
455+ assert (
456+ "received negative value for duration"
457+ in mock_handle_error .call_args [0 ][0 ]
458+ )
454459 assert metric .completed_attempts [0 ].duration_ns == 0
455460
456461 @mock .patch ("time.monotonic_ns" )
@@ -479,7 +484,10 @@ def test_end_with_status(self, mock_monotonic_ns):
479484
480485 handlers = [mock .Mock (), mock .Mock ()]
481486 metric = self ._make_one (
482- expected_type , handlers = handlers , start_time_ns = expected_start_time , state = State .ACTIVE_ATTEMPT
487+ expected_type ,
488+ handlers = handlers ,
489+ start_time_ns = expected_start_time ,
490+ state = State .ACTIVE_ATTEMPT ,
483491 )
484492 metric .cluster_id = expected_cluster
485493 metric .zone = expected_zone
@@ -534,7 +542,10 @@ def test_end_with_negative_duration_ns(self, mock_monotonic_ns):
534542 metric .end_with_status (mock .Mock ())
535543
536544 assert mock_handle_error .call_count == 1
537- assert "received negative value for duration" in mock_handle_error .call_args [0 ][0 ]
545+ assert (
546+ "received negative value for duration"
547+ in mock_handle_error .call_args [0 ][0 ]
548+ )
538549 final_op = metric .handlers [0 ].on_operation_complete .call_args [0 ][0 ]
539550 assert final_op .duration_ns == 0
540551
0 commit comments