mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-21 07:58:04 +00:00
5673ffe2d8
adapt existing test/input test cases to new check. add some more positive test case for useless-object-inheritance msg code was in conflict with existing msg. adapt existing test cases for new checker.
19 lines
434 B
Python
19 lines
434 B
Python
"""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
|