Skip to content

Commit

Permalink
fix illegal pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Aug 5, 2024
1 parent 8c1afaa commit 9164be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xsdba/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def extract_units(arg):
)
elif isinstance(arg, xr.DataArray):
ustr = None if "units" not in arg.attrs else arg.attrs["units"]
elif isinstance(arg, pint.Unit | units.Unit):
elif isinstance(arg, (pint.Unit, units.Unit)):
ustr = pint2str(arg) # XC: from pint2str
elif isinstance(arg, str):
ustr = pint2str(str2pint(arg).units)
Expand Down

0 comments on commit 9164be9

Please sign in to comment.