summaryrefslogtreecommitdiff
path: root/pint
diff options
context:
space:
mode:
authorHernan Grecco <hgrecco@gmail.com>2023-04-28 19:28:19 -0300
committerHernan Grecco <hgrecco@gmail.com>2023-04-28 19:28:19 -0300
commit3e2764f9d32e816ae783bd46a0f966732e49d71f (patch)
tree9a6874b06e6af9eaa7d3e78e08550f008e7c6e62 /pint
parentc159f3583f5ece586fbbf8639edf0e8a5cdd36be (diff)
downloadpint-3e2764f9d32e816ae783bd46a0f966732e49d71f.tar.gz
Honor non_int_type when dividing (fix bug).
Diffstat (limited to 'pint')
-rw-r--r--pint/facets/plain/quantity.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pint/facets/plain/quantity.py b/pint/facets/plain/quantity.py
index 22673c8..359e613 100644
--- a/pint/facets/plain/quantity.py
+++ b/pint/facets/plain/quantity.py
@@ -1368,7 +1368,7 @@ class PlainQuantity(PrettyIPython, SharedRegistryObject, Generic[_MagnitudeType]
if isinstance(a, int):
a = t(a)
if isinstance(b, int):
- b = t(a)
+ b = t(b)
return operator.truediv(a, b)
def __itruediv__(self, other):
@@ -1379,7 +1379,7 @@ class PlainQuantity(PrettyIPython, SharedRegistryObject, Generic[_MagnitudeType]
def __truediv__(self, other):
if isinstance(self.m, int) or isinstance(getattr(other, "m", None), int):
- return self._mul_div(other, self._truedivide_cast_int)
+ return self._mul_div(other, self._truedivide_cast_int, operator.truediv)
return self._mul_div(other, operator.truediv)
def __rtruediv__(self, other):