Skip to content

Commit 30e8da9

Browse files
committed
Use fstring in raised exception
1 parent 7f0ceff commit 30e8da9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stepfunctions/steps/states.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def add_retry(self, retry):
262262
if Field.Retry in self.allowed_fields():
263263
self.retries.extend(retry) if isinstance(retry, list) else self.retries.append(retry)
264264
else:
265-
raise ValueError("{state_type} state does not support retry field. ".format(state_type=type(self).__name__))
265+
raise ValueError(f"{type(self).__name__} state does not support retry field. ")
266266

267267
def add_catch(self, catch):
268268
"""
@@ -274,7 +274,7 @@ def add_catch(self, catch):
274274
if Field.Catch in self.allowed_fields():
275275
self.catches.extend(catch) if isinstance(catch, list) else self.catches.append(catch)
276276
else:
277-
raise ValueError("{state_type} state does not support catch field. ".format(state_type=type(self).__name__))
277+
raise ValueError(f"{type(self).__name__} state does not support catch field. ")
278278

279279
def to_dict(self):
280280
result = super(State, self).to_dict()

0 commit comments

Comments
 (0)