We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4000c1 commit 2f4059cCopy full SHA for 2f4059c
1 file changed
babel/units.py
@@ -156,9 +156,7 @@ def format_unit(
156
# so these aliases specified in `root.xml` are hard-coded here:
157
# <unitLength type="long"><alias source="locale" path="../unitLength[@type='short']"/></unitLength>
158
# <unitLength type="narrow"><alias source="locale" path="../unitLength[@type='short']"/></unitLength>
159
- lengths_to_check = [length]
160
- if length in ("long", "narrow"):
161
- lengths_to_check.append("short")
+ lengths_to_check = [length, "short"] if length in ("long", "narrow") else [length]
162
163
for real_length in lengths_to_check:
164
length_patterns = unit_patterns.get(real_length, {})
0 commit comments