From b4c466def3ff4e38a3f0fd8d65b5fe4b20cbf8fd Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 14 Jun 2023 21:17:15 +0100 Subject: [PATCH] delete reduce_dimensions --- pint/facets/plain/quantity.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pint/facets/plain/quantity.py b/pint/facets/plain/quantity.py index 3c34d3c07..d2c9054c4 100644 --- a/pint/facets/plain/quantity.py +++ b/pint/facets/plain/quantity.py @@ -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)