Reports usages of Python functions, or methods that are marked as
deprecated and raise the DeprecationWarning
or PendingDeprecationWarning
warning.
Also, this inspection highlights usages of abc.abstractstaticmethod
, abc.abstractproperty
, and abc.abstractclassmethod
decorators.
Example:
class Foo: @property def bar(self): import warnings warnings.warn("this is deprecated", DeprecationWarning, 2) return 5 foo = Foo() print(foo.bar)