basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

special forms that work with boolean context semantics `Truthy`/`Falsey`

Open KotlinIsland opened this issue 1 year ago • 0 comments

t: Truthy = None # error: `None` can't be `True`
f: Falsey = 1 # error: `1` can't be `False`

maybe also a helpful-bool which only accepts types that implement __bool__ or __len__

KotlinIsland avatar Nov 05 '24 00:11 KotlinIsland