Skip to content

Commit

Permalink
manual ruff check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaily committed Dec 23, 2024
1 parent 068d162 commit 99fef6e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions awscli/customizations/ec2/addcount.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
from botocore import model

from awscli.arguments import BaseCLIArgument
from awscli.customizations.exceptions import ParamValidationError


logger = logging.getLogger(__name__)


DEFAULT = 1
HELP = """
<p>Number of instances to launch. If a single number is provided, it
is assumed to be the minimum to launch (defaults to %d). If a range is
provided in the form <code>min:max</code> then the first number is
interpreted as the minimum number of instances to launch and the second
is interpreted as the maximum number of instances to launch.</p>""" % DEFAULT
HELP = (
"\n<p>Number of instances to launch. If a single number is provided, it\n"
f"is assumed to be the minimum to launch (defaults to {DEFAULT:d}). If a range is\n"
"provided in the form <code>min:max</code> then the first number is\n"
"interpreted as the minimum number of instances to launch and the second\n"
"is interpreted as the maximum number of instances to launch.</p>"
)


def register_count_events(event_handler):
Expand Down Expand Up @@ -90,7 +92,7 @@ def add_to_params(self, parameters, value):
minstr, maxstr = (value, value)
parameters['MinCount'] = int(minstr)
parameters['MaxCount'] = int(maxstr)
except:
except Exception:
msg = ('count parameter should be of '
'form min[:max] (e.g. 1 or 1:10)')
raise ParamValidationError(msg)

0 comments on commit 99fef6e

Please sign in to comment.