summaryrefslogtreecommitdiff
path: root/tests/input/func_noerror_class_attributes.py
blob: b6fd4601ed278f4a97bc35d66d43909941fbb6d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Test that valid class attribute doesn't trigger errors"""
__revision__ = 'sponge bob'
# pylint: disable=useless-object-inheritance

class Clazz(object):
    "dummy class"

    def __init__(self):
        self.topic = 5
        self._data = 45

    def change_type(self, new_class):
        """Change type"""
        self.__class__ = new_class

    def do_nothing(self):
        "I do nothing useful"
        return self.topic + 56