Skip to content

Commit

Permalink
perf: use _get_symbol instead of get_symbol when short formatting (~)
Browse files Browse the repository at this point in the history
This assumes that the unit has the canonical name, but it was the same
assumption that in pint 0.23
  • Loading branch information
hgrecco committed Jan 20, 2024
1 parent bc32ac1 commit d85a1cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pint/delegates/formatter/_format_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def short_form(
registry: UnitRegistry,
) -> Iterable[tuple[str, T]]:
"""Replace each unit by its short form."""
return map_keys(registry.get_symbol, units)
return map_keys(registry._get_symbol, units)


def localized_form(
Expand Down

0 comments on commit d85a1cb

Please sign in to comment.