Skip to content

Commit

Permalink
Fixed lack of multiplier in raw format
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Jan 18, 2024
1 parent 0127e3c commit efea263
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pint/delegates/formatter/plain.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def format_unit(
) -> str:
units = format_compound_unit(unit, uspec, **babel_kwds)

return " ".join(k if v == 1 else f"{k} ** {v}" for k, v in units)
return " * ".join(k if v == 1 else f"{k} ** {v}" for k, v in units)

def format_quantity(
self,
Expand All @@ -64,7 +64,7 @@ def format_quantity(
)

joint_fstring = "{} {}"

print(repr(mspec), repr(uspec))
return joint_fstring.format(
self.format_magnitude(quantity.magnitude, mspec, **babel_kwds),
self.format_unit(quantity.units, uspec, **babel_kwds),
Expand Down

0 comments on commit efea263

Please sign in to comment.