protected-access / W0212#
Access to a protected member %s of a client class
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
class Worm: def __swallow(self): pass jim = Worm() jim.__swallow() # [protected-access]
class Worm: def __swallow(self): pass def eat(self): return self.__swallow() jim = Worm() jim.eat()
Created by the classes checker.