Skip to content

Commit 2a99616

Browse files
LeoLiao123aslonnie
andauthored
[Refactor] fix ruff rule B035: static-key-dict-comprehension (ray-project#50341)
ensures that every instance’s status is properly collected in a list rather than being overwritten by a static key in a dictionary comprehension. removes `describe_instance_status_ok` function. --------- Signed-off-by: LeoLiao123 <[email protected]> Co-authored-by: Lonnie Liu <[email protected]>
1 parent 455cbfb commit 2a99616

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ ignore = [
3434
"B024",
3535
"B026",
3636
"B027",
37-
"B035",
3837
"B904",
3938
"C419",
4039
# Below are auto-fixable rules

python/ray/tests/aws/utils/stubs.py

-25
Original file line numberDiff line numberDiff line change
@@ -261,31 +261,6 @@ def describe_launch_template_versions_by_name_default(ec2_client_stub, versions)
261261
)
262262

263263

264-
def describe_instance_status_ok(ec2_client_stub, instance_ids):
265-
ec2_client_stub.add_response(
266-
"describe_instance_status",
267-
expected_params={"InstanceIds": instance_ids},
268-
service_response={
269-
"InstanceStatuses": [
270-
{
271-
"InstanceId": instance_id,
272-
"InstanceState": {"Code": 16, "Name": "running"},
273-
"AvailabilityZone": "us-west-2",
274-
"SystemStatus": {
275-
"Status": "ok",
276-
"Details": [{"Status": "passed", "Name": "reachability"}],
277-
},
278-
"InstanceStatus": {
279-
"Status": "ok",
280-
"Details": [{"Status": "passed", "Name": "reachability"}],
281-
},
282-
}
283-
]
284-
for instance_id in instance_ids
285-
},
286-
)
287-
288-
289264
def get_ec2_cwa_installed_tag_true(ec2_client_stub, node_id):
290265
ec2_client_stub.add_response(
291266
"describe_instances",

0 commit comments

Comments
 (0)