Skip to content

Commit a467016

Browse files
committed
fix flake8 syntax error in py38
1 parent a52144e commit a467016

File tree

1 file changed

+25
-31
lines changed

1 file changed

+25
-31
lines changed

tests/integ/sagemaker/serve/test_serve_js_deep_unit_tests.py

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@
2424
def test_js_model_with_optimize_speculative_decoding_config_gated_requests_are_expected(
2525
sagemaker_session,
2626
):
27-
with (
28-
patch.object(
29-
Session, "create_model", return_value="mock_model"
30-
) as mock_create_model, # noqa: E999
31-
patch.object(
32-
Session, "endpoint_from_production_variants"
33-
) as mock_endpoint_from_production_variants,
34-
):
27+
with patch.object(
28+
Session, "create_model", return_value="mock_model"
29+
) as mock_create_model, patch.object(
30+
Session, "endpoint_from_production_variants"
31+
) as mock_endpoint_from_production_variants:
3532
iam_client = sagemaker_session.boto_session.client("iam")
3633
role_arn = iam_client.get_role(RoleName=ROLE_NAME)["Role"]["Arn"]
3734

@@ -99,18 +96,17 @@ def test_js_model_with_optimize_speculative_decoding_config_gated_requests_are_e
9996
def test_js_model_with_optimize_sharding_and_resource_requirements_requests_are_expected(
10097
sagemaker_session,
10198
):
102-
with (
103-
patch.object(
104-
Session,
105-
"wait_for_optimization_job",
106-
return_value={"OptimizationJobName": "mock_optimization_job"},
107-
),
108-
patch.object(Session, "create_model", return_value="mock_model") as mock_create_model,
109-
patch.object(
110-
Session, "endpoint_from_production_variants", return_value="mock_endpoint_name"
111-
) as mock_endpoint_from_production_variants,
112-
patch.object(Session, "create_inference_component") as mock_create_inference_component,
113-
):
99+
with patch.object(
100+
Session,
101+
"wait_for_optimization_job",
102+
return_value={"OptimizationJobName": "mock_optimization_job"},
103+
), patch.object(
104+
Session, "create_model", return_value="mock_model"
105+
) as mock_create_model, patch.object(
106+
Session, "endpoint_from_production_variants", return_value="mock_endpoint_name"
107+
) as mock_endpoint_from_production_variants, patch.object(
108+
Session, "create_inference_component"
109+
) as mock_create_inference_component:
114110
iam_client = sagemaker_session.boto_session.client("iam")
115111
role_arn = iam_client.get_role(RoleName=ROLE_NAME)["Role"]["Arn"]
116112

@@ -178,17 +174,15 @@ def test_js_model_with_optimize_sharding_and_resource_requirements_requests_are_
178174
def test_js_model_with_optimize_quantization_on_pre_optimized_model_requests_are_expected(
179175
sagemaker_session,
180176
):
181-
with (
182-
patch.object(
183-
Session,
184-
"wait_for_optimization_job",
185-
return_value={"OptimizationJobName": "mock_optimization_job"},
186-
),
187-
patch.object(Session, "create_model", return_value="mock_model") as mock_create_model,
188-
patch.object(
189-
Session, "endpoint_from_production_variants", return_value="mock_endpoint_name"
190-
) as mock_endpoint_from_production_variants,
191-
):
177+
with patch.object(
178+
Session,
179+
"wait_for_optimization_job",
180+
return_value={"OptimizationJobName": "mock_optimization_job"},
181+
), patch.object(
182+
Session, "create_model", return_value="mock_model"
183+
) as mock_create_model, patch.object(
184+
Session, "endpoint_from_production_variants", return_value="mock_endpoint_name"
185+
) as mock_endpoint_from_production_variants:
192186
iam_client = sagemaker_session.boto_session.client("iam")
193187
role_arn = iam_client.get_role(RoleName=ROLE_NAME)["Role"]["Arn"]
194188

0 commit comments

Comments
 (0)