from typing import NoReturn
def foo() -> NoReturn:
raise Exception
def bar() -> NoReturn:
foo()
foo()
print("hi") # no warning
The first call to foo is suppress the unreachable intentionally, (same with the second). But the print("hi) should definitely show an unreachable error.
The first call to
foois suppress theunreachableintentionally, (same with the second). But theprint("hi)should definitely show an unreachable error.