Fix flake8/pylint errors.
This commit is contained in:
parent
808a645b40
commit
d651cc75b0
@ -276,7 +276,7 @@ class Completer(QObject):
|
|||||||
including a trailing space and we shouldn't continue
|
including a trailing space and we shouldn't continue
|
||||||
completing the current item.
|
completing the current item.
|
||||||
"""
|
"""
|
||||||
text = self._cmd.prefix() + ' '.join([*before, newtext])
|
text = self._cmd.prefix() + ' '.join(before + [newtext])
|
||||||
pos = len(text) + (1 if immediate else 0)
|
pos = len(text) + (1 if immediate else 0)
|
||||||
if after:
|
if after:
|
||||||
text += ' ' + ' '.join(after)
|
text += ' ' + ' '.join(after)
|
||||||
|
@ -261,6 +261,7 @@ def test_on_selection_changed(before, newtxt, after, completer_obj,
|
|||||||
after_txt += ' '
|
after_txt += ' '
|
||||||
check(True, 1, after_txt, after_pos)
|
check(True, 1, after_txt, after_pos)
|
||||||
|
|
||||||
|
|
||||||
def test_quickcomplete_flicker(status_command_stub, completer_obj,
|
def test_quickcomplete_flicker(status_command_stub, completer_obj,
|
||||||
completion_widget_stub, config_stub):
|
completion_widget_stub, config_stub):
|
||||||
"""Validate fix for #1519: bookmark-load background highlighting quirk.
|
"""Validate fix for #1519: bookmark-load background highlighting quirk.
|
||||||
@ -271,7 +272,8 @@ def test_quickcomplete_flicker(status_command_stub, completer_obj,
|
|||||||
one completion available, it keeps the completionmenu open.
|
one completion available, it keeps the completionmenu open.
|
||||||
|
|
||||||
This test validates that the completion model is not re-set after we
|
This test validates that the completion model is not re-set after we
|
||||||
quick-complete an entry after maxsplit."""
|
quick-complete an entry after maxsplit.
|
||||||
|
"""
|
||||||
model = unittest.mock.Mock()
|
model = unittest.mock.Mock()
|
||||||
model.data = unittest.mock.Mock(return_value='http://example.com')
|
model.data = unittest.mock.Mock(return_value='http://example.com')
|
||||||
indexes = [unittest.mock.Mock()]
|
indexes = [unittest.mock.Mock()]
|
||||||
|
Loading…
Reference in New Issue
Block a user