Skip to content

Commit 915a889

Browse files
Merge branch 'master' into fix-cli-uncertainty-package-import
2 parents cc4215e + f9c381c commit 915a889

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Pint Changelog
55
-----------------
66

77
- Fix the default behaviour for pint-convert (cli) for importing uncertainties package
8+
- Added mu and mc as alternatives for SI micro prefix
89
- Added ℓ as alternative for liter
910
- Fix the default behaviour for pint-convert (cli) for importing uncertainties package (PR #2032, Issue #2016)
1011
- Support permille units and `‰` symbol (PR #2033, Issue #1963)

pint/default_en.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pico- = 1e-12 = p-
7272
nano- = 1e-9 = n-
7373
# The micro (U+00B5) and Greek mu (U+03BC) are both valid prefixes,
7474
# and they often use the same glyph.
75-
micro- = 1e-6 = µ- = μ- = u-
75+
micro- = 1e-6 = µ- = μ- = u- = mu- = mc-
7676
milli- = 1e-3 = m-
7777
centi- = 1e-2 = c-
7878
deci- = 1e-1 = d-

pint/testsuite/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
femto- = 1e-15 = f-
1515
pico- = 1e-12 = p-
1616
nano- = 1e-9 = n-
17-
micro- = 1e-6 = µ- = μ- = u-
17+
micro- = 1e-6 = µ- = μ- = u- = mu- = mc-
1818
milli- = 1e-3 = m-
1919
centi- = 1e-2 = c-
2020
deci- = 1e-1 = d-

pint/testsuite/test_issues.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,12 @@ def test_micro_creation_U03bc(self, module_registry):
408408
def test_micro_creation_U00b5(self, module_registry):
409409
module_registry.Quantity(2, "µm")
410410

411+
def test_micro_creation_mu(self, module_registry):
412+
module_registry.Quantity(2, "mug")
413+
414+
def test_micro_creation_mc(self, module_registry):
415+
module_registry.Quantity(2, "mcg")
416+
411417
def test_liter_creation_U2113(self, module_registry):
412418
module_registry.Quantity(2, "ℓ")
413419

0 commit comments

Comments
 (0)