summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHernan <hernan.grecco@gmail.com>2022-04-28 20:30:40 -0300
committerHernan <hernan.grecco@gmail.com>2022-04-28 21:46:55 -0300
commit78be0c58a7b45f4e2fd3f8084ac401b3491f7780 (patch)
tree9659d7915adeb1504817bfa2820089b79998fbaa
parent6c17cf7e80b15f57157ce9596300e54cbeaf7203 (diff)
downloadpint-78be0c58a7b45f4e2fd3f8084ac401b3491f7780.tar.gz
Change Representation to Quantity and Unit (not Plain)
-rw-r--r--pint/facets/plain/quantity.py4
-rw-r--r--pint/facets/plain/unit.py4
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: