basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

Show inlay hints on things that are `Never`

Open KotlinIsland opened this issue 1 year ago • 1 comments

I'm not sure how it would look, but:

def f(x: bool):
    if x:
        exit(1)  `Never`
    print("hi")

I think this would be useful, as it's quite easy for a Never moment to slip by unnoticed.

KotlinIsland avatar May 01 '24 00:05 KotlinIsland

i think it's only an issue when attempting to assign a Never value, or having code after the function that returns Never (aka unreachable code). i think this is covered by #97

DetachHead avatar May 01 '24 00:05 DetachHead

closing in favor of #97

DetachHead avatar Jun 13 '24 09:06 DetachHead