diff options
author | Aarni Koskela <akx@iki.fi> | 2022-11-02 09:38:38 +0200 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2022-11-04 17:26:01 +0200 |
commit | a579720005cbaab17a19a47d239623a95e2036ce (patch) | |
tree | cb3a15033c9256ef6d860a3385c0852939fec7d0 /babel/lists.py | |
parent | 5fcc2535f96bfce9c1a1ecf9d19a976b9bf6ab6b (diff) | |
download | babel-f-strings.tar.gz |
Replace %/.format/concatenation with f-strings where feasiblef-strings
Original conversion suggestions via flynt, edited by hand.
Diffstat (limited to 'babel/lists.py')
-rw-r--r-- | babel/lists.py | 9 |
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: |