diff options
-rw-r--r-- | pint/facets/plain/quantity.py | 4 | ||||
-rw-r--r-- | 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"<PlainQuantity({self._magnitude:.9}, '{self._units}')>" + return f"<Quantity({self._magnitude:.9}, '{self._units}')>" else: - return f"<PlainQuantity({self._magnitude}, '{self._units}')>" + return f"<Quantity({self._magnitude}, '{self._units}')>" 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 "<PlainUnit('{}')>".format(self._units) + return "<Unit('{}')>".format(self._units) @property def dimensionless(self) -> bool: |