Skip to content

Commit

Permalink
Fix unintentional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Saelyos committed Oct 20, 2023
1 parent 221ecc3 commit a2bebe0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pint/registry_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _converter(ureg, values, strict):
for ndx in dependent_args_ndx:
value = values[ndx]
assert _replace_units(args_as_uc[ndx][0], values_by_name) is not None
new_values[ndx] = ureg.convert(
new_values[ndx] = ureg._convert(
getattr(value, "_magnitude", value),
getattr(value, "_units", UnitsContainer({})),
_replace_units(args_as_uc[ndx][0], values_by_name),
Expand All @@ -143,15 +143,15 @@ def _converter(ureg, values, strict):
# third pass: convert other arguments
for ndx in unit_args_ndx:
if isinstance(values[ndx], ureg.Quantity):
new_values[ndx] = ureg.convert(
new_values[ndx] = ureg._convert(
values[ndx]._magnitude, values[ndx]._units, args_as_uc[ndx][0]
)
else:
if strict:
if isinstance(values[ndx], str):
# if the value is a string, we try to parse it
tmp_value = ureg.parse_expression(values[ndx])
new_values[ndx] = ureg.convert(
new_values[ndx] = ureg._convert(
tmp_value._magnitude, tmp_value._units, args_as_uc[ndx][0]
)
else:
Expand Down

0 comments on commit a2bebe0

Please sign in to comment.