pylint: Check attr-defined-outside-init for tests.
This commit is contained in:
parent
803398c49b
commit
109984c96e
@ -49,7 +49,6 @@ def main():
|
||||
files.append(os.path.join(dirpath, fn))
|
||||
|
||||
disabled = [
|
||||
'attribute-defined-outside-init',
|
||||
'redefined-outer-name',
|
||||
'unused-argument',
|
||||
'missing-docstring',
|
||||
|
@ -71,7 +71,9 @@ def fake_statusbar(qtbot):
|
||||
vbox.addStretch()
|
||||
|
||||
statusbar = FakeStatusBar(container)
|
||||
statusbar.container = container # to make sure container isn't GCed
|
||||
# to make sure container isn't GCed
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
statusbar.container = container
|
||||
vbox.addWidget(statusbar)
|
||||
|
||||
container.show()
|
||||
|
@ -38,6 +38,7 @@ class HTTPGetStub(httpclient.HTTPClient):
|
||||
|
||||
def __init__(self, success=True, json=None):
|
||||
super().__init__()
|
||||
self.url = None
|
||||
self._success = success
|
||||
if json:
|
||||
self._json = json
|
||||
|
@ -933,6 +933,8 @@ class TestEventLoop:
|
||||
loop: The EventLoop we're testing.
|
||||
"""
|
||||
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
|
||||
def _assert_executing(self):
|
||||
"""Slot which gets called from timers to be sure the loop runs."""
|
||||
assert self.loop._executing
|
||||
|
@ -47,7 +47,8 @@ class FakeDNS:
|
||||
FakeDNSAnswer = collections.namedtuple('FakeDNSAnswer', ['error'])
|
||||
|
||||
def __init__(self):
|
||||
self.reset()
|
||||
self.used = False
|
||||
self.answer = None
|
||||
|
||||
def __repr__(self):
|
||||
return utils.get_repr(self, used=self.used, answer=self.answer)
|
||||
|
Loading…
Reference in New Issue
Block a user