Skip to content

Commit

Permalink
doc: fixed doctest for missing output
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Jan 22, 2024
1 parent cef8e96 commit 9f06a3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/user/formatting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ In case the format is omitted, the corresponding value in the formatter

>>> ureg.formatter.default_format = "P"
>>> f"{q}"

'2.3×10⁻⁶ meter³/kilogram/second²'

Pint Format Types
-----------------
Expand Down Expand Up @@ -113,6 +113,7 @@ following methods: `format_magnitude`, `format_unit`, `format_quantity`, `format
...
... def format_unit(self, unit, uspec: str = "", **babel_kwds) -> str:
... return "ups!"
...
>>> ureg.formatter = MyFormatter()
>>> str(q)
'2.3e-06 ups!'
Expand Down

0 comments on commit 9f06a3a

Please sign in to comment.