mypy error: ureg.m annotation is expected to be Quantity instead of Unit
Luna137 opened this issue · comments
Luna137 commented
With the newest version of pint
, running mypy
on the following script
import pint
ureg = pint.UnitRegistry()
unit_of_length: pint.Unit = ureg.m
returns the following error:
Incompatible types in assignment (expression has type "Quantity", variable has type "Unit") [assignment]