Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hgrecco/pint
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Jul 15, 2023
2 parents 09f794f + 86bce10 commit dbb12a7
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pint/facets/plain/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,6 @@
T = TypeVar("T", bound=Magnitude)


def reduce_dimensions(f):
def wrapped(self, *args, **kwargs):
result = f(self, *args, **kwargs)
try:
if result._REGISTRY.autoconvert_to_preferred:
result = result.to_preferred()
except AttributeError:
pass

try:
if result._REGISTRY.auto_reduce_dimensions:
return result.to_reduced_units()
else:
return result
except AttributeError:
return result

return wrapped


def ireduce_dimensions(f):
def wrapped(self, *args, **kwargs):
result = f(self, *args, **kwargs)
Expand Down

0 comments on commit dbb12a7

Please sign in to comment.