feat: Adds `Format.compact_decimal` utility by DenverCoder1 · Pull Request #921 · python-babel/babel

Conversation

@DenverCoder1

Adds a shortcut to Format support utility for compact_decimal

>>> fmt = Format('en_US')
>>> fmt.compact_decimal(123456789)
u'123M'

@codecov

Codecov Report

Merging #921 (e46f66d) into master (a30d7cf) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #921   +/-   ##
=======================================
  Coverage   91.55%   91.56%           
=======================================
  Files          21       21           
  Lines        4217     4219    +2     
=======================================
+ Hits         3861     3863    +2     
  Misses        356      356           
Impacted Files Coverage Δ
babel/support.py 84.95% <100.00%> (+0.12%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

akx

akx approved these changes Nov 2, 2022

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Labels

2 participants

@DenverCoder1 @akx