사용이 중지된 것으로 표시되어 있으며 DeprecationWarning 또는 PendingDeprecationWarning 경고를 일으키는 Python 함수 또는 메서드의 사용 사례를 보고합니다.
이 검사는 abc.abstractstaticmethod, abc.abstractproperty, 및 abc.abstractclassmethod 데코레이터의 사용 사례를 강조 표시합니다.
예:
class Foo:
@property
def bar(self):
import warnings
warnings.warn("this is deprecated", DeprecationWarning, 2)
return 5
foo = Foo()
print(foo.bar)