summaryrefslogtreecommitdiff
path: root/pint/facets
diff options
context:
space:
mode:
authorHernan Grecco <hgrecco@gmail.com>2023-05-11 15:06:04 -0300
committerHernan Grecco <hgrecco@gmail.com>2023-05-11 15:06:04 -0300
commit94932f92de193fa5bbf60a6c30df47d4ce273e0f (patch)
treef30c0ab87c47841487ba3b6b7accbde06c35e2e0 /pint/facets
parent8426b391ff88dbfc7421ceda415ff2d7bcbcda37 (diff)
downloadpint-94932f92de193fa5bbf60a6c30df47d4ce273e0f.tar.gz
More typing improvements
Diffstat (limited to 'pint/facets')
-rw-r--r--pint/facets/plain/quantity.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pint/facets/plain/quantity.py b/pint/facets/plain/quantity.py
index 2f3de43..896dcfb 100644
--- a/pint/facets/plain/quantity.py
+++ b/pint/facets/plain/quantity.py
@@ -152,11 +152,11 @@ class PlainQuantity(Generic[MagnitudeT], PrettyIPython, SharedRegistryObject):
# TODO: Check if this is still the case.
return _unpickle_quantity, (PlainQuantity, self.magnitude, self._units)
- # @overload
- # def __new__(
- # cls, value: T, units: UnitLike | None = None
- # ) -> PlainQuantity[T]:
- # ...
+ @overload
+ def __new__(
+ cls, value: MagnitudeT, units: UnitLike | None = None
+ ) -> PlainQuantity[MagnitudeT]:
+ ...
@overload
def __new__(cls, value: str, units: UnitLike | None = None) -> PlainQuantity[int]: