Skip to content

Commit 9a06b53

Browse files
committed
Use alias for unit_registry
1 parent 49e8fa7 commit 9a06b53

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

xarray/tests/test_units.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ def assert_equal(q1, q2):
7575

7676

7777
class PintInfo(UnitInfo):
78-
unit = unit_registry.m
79-
compatible_unit = unit_registry.mm
80-
incompatible_unit = unit_registry.s
81-
dimensionless = unit_registry.dimensionless
78+
ureg = unit_registry
79+
80+
unit = ureg.m
81+
compatible_unit = ureg.mm
82+
incompatible_unit = ureg.s
83+
dimensionless = ureg.dimensionless
8284

83-
unit_type = unit_registry.Unit
84-
quantity_type = unit_registry.Quantity
85+
unit_type = ureg.Unit
86+
quantity_type = ureg.Quantity
8587

8688
@staticmethod
8789
def strip_units(quantity):

0 commit comments

Comments
 (0)