from mypy_extensions import i64
i: i64 = 0
if i: pass
Type checked with mypy, this reports:
error: has tpe "i64" which does not implement __bool__ or __len__ so it could always be true in boolean context
In reality, truthy tests work fine in both compiled and non-compiled code, so seems like there's something missing here for mypy to understand the type correctly.
Type checked with mypy, this reports:
In reality, truthy tests work fine in both compiled and non-compiled code, so seems like there's something missing here for mypy to understand the type correctly.