File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
services/autoscaling/src/simcore_service_autoscaling/utils Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 11import functools
22import logging
33import re
4- from typing import Final
4+ from typing import Final , TypeAlias
55
66from aws_library .ec2 import (
77 EC2InstanceBootSpecific ,
@@ -134,9 +134,7 @@ def ec2_buffer_startup_script(
134134def _instance_type_by_type_name (
135135 ec2_type : EC2InstanceType , * , type_name : InstanceTypeType | None
136136) -> bool :
137- if type_name is None :
138- return True
139- return bool (ec2_type .name == type_name )
137+ return type_name is None or ec2_type .name == type_name
140138
141139
142140def find_selected_instance_type_for_task (
@@ -179,9 +177,9 @@ def get_machine_buffer_type(
179177 return available_ec2_types [0 ]
180178
181179
182- DrainedNodes = list [AssociatedInstance ]
183- BufferDrainedNodes = list [AssociatedInstance ]
184- TerminatingNodes = list [AssociatedInstance ]
180+ DrainedNodes : TypeAlias = list [AssociatedInstance ]
181+ BufferDrainedNodes : TypeAlias = list [AssociatedInstance ]
182+ TerminatingNodes : TypeAlias = list [AssociatedInstance ]
185183
186184
187185def sort_drained_nodes (
You can’t perform that action at this time.
0 commit comments