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