Fixed linters.
This commit is contained in:
parent
370c8a8b07
commit
4b883c089e
@ -26,7 +26,7 @@ from PyQt5.QtCore import pyqtSlot, QUrl, QObject
|
|||||||
|
|
||||||
from qutebrowser.config import config, configexc
|
from qutebrowser.config import config, configexc
|
||||||
from qutebrowser.commands import cmdexc, cmdutils
|
from qutebrowser.commands import cmdexc, cmdutils
|
||||||
from qutebrowser.utils import message, log, objreg, qtutils
|
from qutebrowser.utils import message, objreg, qtutils
|
||||||
from qutebrowser.misc import split
|
from qutebrowser.misc import split
|
||||||
|
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ class CommandRunner(QObject):
|
|||||||
self._partial_match = partial_match
|
self._partial_match = partial_match
|
||||||
self._win_id = win_id
|
self._win_id = win_id
|
||||||
|
|
||||||
def _get_alias(self, text, default = None):
|
def _get_alias(self, text, default=None):
|
||||||
"""Get an alias from the config.
|
"""Get an alias from the config.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -105,7 +105,7 @@ class CommandRunner(QObject):
|
|||||||
new_cmd += ' '
|
new_cmd += ' '
|
||||||
return new_cmd
|
return new_cmd
|
||||||
|
|
||||||
def parse_all(self, text, aliases = True, *args, **kwargs):
|
def parse_all(self, text, aliases=True, *args, **kwargs):
|
||||||
"""Split a command on ;; and parse all parts.
|
"""Split a command on ;; and parse all parts.
|
||||||
|
|
||||||
If the first command in the commandline is a non-split one, it only
|
If the first command in the commandline is a non-split one, it only
|
||||||
@ -119,7 +119,6 @@ class CommandRunner(QObject):
|
|||||||
Yields:
|
Yields:
|
||||||
ParseResult tuples.
|
ParseResult tuples.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if aliases:
|
if aliases:
|
||||||
text = self._get_alias(text, text)
|
text = self._get_alias(text, text)
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class TestCommandRunner:
|
|||||||
list(cr.parse_all(cmdline_test.cmd, aliases=False))
|
list(cr.parse_all(cmdline_test.cmd, aliases=False))
|
||||||
|
|
||||||
def test_parse_all_with_alias(self, cmdline_test, monkeypatch):
|
def test_parse_all_with_alias(self, cmdline_test, monkeypatch):
|
||||||
alias_dict = dict(alias_name = cmdline_test.cmd)
|
alias_dict = dict(alias_name=cmdline_test.cmd)
|
||||||
|
|
||||||
def mock_get(section, *args, **kwargs):
|
def mock_get(section, *args, **kwargs):
|
||||||
assert section == "aliases"
|
assert section == "aliases"
|
||||||
|
Loading…
Reference in New Issue
Block a user