summaryrefslogtreecommitdiff
path: root/babel/lists.py
diff options
context:
space:
mode:
Diffstat (limited to 'babel/lists.py')
-rw-r--r--babel/lists.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/babel/lists.py b/babel/lists.py
index 11cc7d7..ea983ef 100644
--- a/babel/lists.py
+++ b/babel/lists.py
@@ -68,11 +68,10 @@ def format_list(lst, style='standard', locale=DEFAULT_LOCALE):
return lst[0]
if style not in locale.list_patterns:
- raise ValueError('Locale %s does not support list formatting style %r (supported are %s)' % (
- locale,
- style,
- list(sorted(locale.list_patterns)),
- ))
+ raise ValueError(
+ f'Locale {locale} does not support list formatting style {style!r} '
+ f'(supported are {sorted(locale.list_patterns)})'
+ )
patterns = locale.list_patterns[style]
if len(lst) == 2: