Skip to content

Commit

Permalink
Use alias for unit_registry
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Jun 28, 2023
1 parent 49e8fa7 commit 9a06b53
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions xarray/tests/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ def assert_equal(q1, q2):


class PintInfo(UnitInfo):
unit = unit_registry.m
compatible_unit = unit_registry.mm
incompatible_unit = unit_registry.s
dimensionless = unit_registry.dimensionless
ureg = unit_registry

unit = ureg.m
compatible_unit = ureg.mm
incompatible_unit = ureg.s
dimensionless = ureg.dimensionless

unit_type = unit_registry.Unit
quantity_type = unit_registry.Quantity
unit_type = ureg.Unit
quantity_type = ureg.Quantity

@staticmethod
def strip_units(quantity):
Expand Down

0 comments on commit 9a06b53

Please sign in to comment.