Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

func_noerror_classes_protected_member_access.py 531B

1234567891011121314151617181920212223242526
  1. """
  2. #3123: W0212 false positive on static method
  3. """
  4. __revision__ = 1
  5. # pylint: disable=no-classmethod-decorator, no-staticmethod-decorator
  6. class A3123(object):
  7. """oypuee"""
  8. _protected = 1
  9. def __init__(self):
  10. pass
  11. def cmeth(cls, val):
  12. """set protected member"""
  13. cls._protected = +val
  14. cmeth = classmethod(cmeth)
  15. def smeth(val):
  16. """set protected member"""
  17. A3123._protected += val
  18. smeth = staticmethod(smeth)
  19. prop = property(lambda self: self._protected)