summaryrefslogtreecommitdiff
path: root/pylint/test/input/func_noerror_classes_protected_member_access.py
blob: 2ffd9d112a0d19238a0c2485a42a268bf81f5d0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
#3123: W0212 false positive on static method
"""
__revision__ = 1

# pylint: disable=no-classmethod-decorator, no-staticmethod-decorator
class A3123(object):
    """oypuee"""
    _protected = 1
    def __init__(self):
        pass


    def cmeth(cls, val):
        """set protected member"""
        cls._protected = +val

    cmeth = classmethod(cmeth)

    def smeth(val):
        """set protected member"""
        A3123._protected += val

    smeth = staticmethod(smeth)

    prop = property(lambda self: self._protected)