Skip to content

Commit

Permalink
Add functools.cache to _get_root_units
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Jul 16, 2023
1 parent ef45b86 commit 4a8a1b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pint/facets/plain/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ def get_root_units(

return f, self.Unit(units)

@functools.cache
def _get_root_units(
self,
numerator: UnitsContainer,
Expand Down

0 comments on commit 4a8a1b5

Please sign in to comment.