hgrecco / pint

Operate and manipulate physical quantities in Python

Home Page:http://pint.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mypy error: ureg.m annotation is expected to be Quantity instead of Unit

Luna137 opened this issue · comments

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]