protected メンバーがクラス、定義されているクラスの子孫、またはモジュールの外部でアクセスされている場合に報告します。

例:


class Foo:
    def _protected_method(self):
        pass


class Bar(Foo):
    def public_method(self):
        self._protected_method()


foo = Foo()
foo._protected_method() # protected メソッドへのアクセス