Open hassec opened 1 year ago
When type checking the below snippet with mypy (v.1.4.1), it raises an error. Pint version is 0.22.
import pint def foo(a: pint.Quantity, b: pint.Unit) -> pint.Quantity: return a.to(b)
Error:
type.py:4: error: Incompatible return value type (got "PlainQuantity[Any]", expected "Quantity") [return-value]
Got the same with isinstance(foo, pint.Quantity).
isinstance(foo, pint.Quantity)
Is anybody know if there is actually a "right" way to use pint and mypy?
When type checking the below snippet with mypy (v.1.4.1), it raises an error. Pint version is 0.22.
Error: