-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Labels
Description
Feature
import warnings
from typing import NoReturn
def foo() -> NoReturn:
warnings.warn("this is deprecated", DeprecationWarning)
raise NotImplementedError
foo() # I would expect a warning herePitch
I think it would be based to report against deprecated methods, PyCharm supports this:

Another use case for this is warning of "unsupported operations":
class A:
def foo(self) -> None:
print()
class B(A):
def foo(self) -> NoReturn:
warnings.warn("this is an unsupported operation", DeprecationWarning)
raise NotImplementedError()
B().foo() # I would like a warning that this is unsupported