From 78be0c58a7b45f4e2fd3f8084ac401b3491f7780 Mon Sep 17 00:00:00 2001 From: Hernan Date: Thu, 28 Apr 2022 20:30:40 -0300 Subject: Change Representation to Quantity and Unit (not Plain) --- pint/facets/plain/quantity.py | 4 ++-- pint/facets/plain/unit.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pint/facets/plain/quantity.py b/pint/facets/plain/quantity.py index f2b9ae0..8c7c094 100644 --- a/pint/facets/plain/quantity.py +++ b/pint/facets/plain/quantity.py @@ -281,9 +281,9 @@ class PlainQuantity(PrettyIPython, SharedRegistryObject, Generic[_MagnitudeType] def __repr__(self) -> str: if isinstance(self._magnitude, float): - return f"" + return f"" else: - return f"" + return f"" def __hash__(self) -> int: self_base = self.to_base_units() diff --git a/pint/facets/plain/unit.py b/pint/facets/plain/unit.py index 7340764..72c952d 100644 --- a/pint/facets/plain/unit.py +++ b/pint/facets/plain/unit.py @@ -49,7 +49,7 @@ class PlainUnit(PrettyIPython, SharedRegistryObject): self._units = units._units else: raise TypeError( - "units must be of type str, PlainUnit or " + "units must be of type str, Unit or " "UnitsContainer; not {}.".format(type(units)) ) @@ -77,7 +77,7 @@ class PlainUnit(PrettyIPython, SharedRegistryObject): return str(self).encode(locale.getpreferredencoding()) def __repr__(self) -> str: - return "".format(self._units) + return "".format(self._units) @property def dimensionless(self) -> bool: -- cgit v1.2.1