summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHernan <hernan.grecco@gmail.com>2022-04-29 21:09:37 -0300
committerHernan <hernan.grecco@gmail.com>2022-05-07 18:36:27 -0300
commit1b1022d74a74f1ef99ca760065fc0649c66e8728 (patch)
tree7cf582b90b736287f8887925fec6de46a9710307
parentdcbb6cf45671de7fec1ae37bf48c4091229215db (diff)
downloadpint-1b1022d74a74f1ef99ca760065fc0649c66e8728.tar.gz
Remove __handling and __used which are not needed any more
-rw-r--r--pint/facets/plain/quantity.py9
-rw-r--r--pint/facets/plain/unit.py9
2 files changed, 0 insertions, 18 deletions
diff --git a/pint/facets/plain/quantity.py b/pint/facets/plain/quantity.py
index a4ae355..e33afae 100644
--- a/pint/facets/plain/quantity.py
+++ b/pint/facets/plain/quantity.py
@@ -243,15 +243,8 @@ class PlainQuantity(PrettyIPython, SharedRegistryObject, Generic[_MagnitudeType]
inst._magnitude = magnitude
inst._units = units
- inst.__used = False
- inst.__handling = None
-
return inst
- @property
- def debug_used(self):
- return self.__used
-
def __iter__(self: PlainQuantity[Iterable[S]]) -> Iterator[S]:
# Make sure that, if self.magnitude is not iterable, we raise TypeError as soon
# as one calls iter(self) without waiting for the first element to be drawn from
@@ -266,14 +259,12 @@ class PlainQuantity(PrettyIPython, SharedRegistryObject, Generic[_MagnitudeType]
def __copy__(self) -> PlainQuantity[_MagnitudeType]:
ret = self.__class__(copy.copy(self._magnitude), self._units)
- ret.__used = self.__used
return ret
def __deepcopy__(self, memo) -> PlainQuantity[_MagnitudeType]:
ret = self.__class__(
copy.deepcopy(self._magnitude, memo), copy.deepcopy(self._units, memo)
)
- ret.__used = self.__used
return ret
def __str__(self) -> str:
diff --git a/pint/facets/plain/unit.py b/pint/facets/plain/unit.py
index 72c952d..f5de5d1 100644
--- a/pint/facets/plain/unit.py
+++ b/pint/facets/plain/unit.py
@@ -53,21 +53,12 @@ class PlainUnit(PrettyIPython, SharedRegistryObject):
"UnitsContainer; not {}.".format(type(units))
)
- self.__used = False
- self.__handling = None
-
- @property
- def debug_used(self) -> Any:
- return self.__used
-
def __copy__(self) -> PlainUnit:
ret = self.__class__(self._units)
- ret.__used = self.__used
return ret
def __deepcopy__(self, memo) -> PlainUnit:
ret = self.__class__(copy.deepcopy(self._units, memo))
- ret.__used = self.__used
return ret
def __str__(self) -> str: