basedpyright
basedpyright copied to clipboard
Show inlay hints on things that are `Never`
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.
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
closing in favor of #97