basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

conditional expressions don't apply always true logic

Open KotlinIsland opened this issue 1 year ago • 0 comments

from typing import TYPE_CHECKING

b = 1 if TYPE_CHECKING else ""
reveal_type(b)  # int | str

KotlinIsland avatar Aug 28 '24 13:08 KotlinIsland