Skip to content

Commit cdb54de

Browse files
authored
refactor: simplify condition
1 parent c28cba9 commit cdb54de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

babel/numbers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def format_compact_currency(number, currency, *, format_type="short", locale=LC_
652652
# find first format that has a currency symbol
653653
for magnitude in compact_format['other']:
654654
format = compact_format['other'][magnitude].pattern
655-
if not re.search(r'\u00A4', format):
655+
if '¤' not in format:
656656
continue
657657
# remove characters that are not the currency symbol, 0's or spaces
658658
format = re.sub(r'[^0\s\¤]', '', format)

0 commit comments

Comments
 (0)