diff --git a/qutebrowser/network/qutescheme.py b/qutebrowser/network/qutescheme.py index 292939b1b..4e74dadf7 100644 --- a/qutebrowser/network/qutescheme.py +++ b/qutebrowser/network/qutescheme.py @@ -27,8 +27,6 @@ Module attributes: pyeval_output: The output of the last :pyeval command. """ -import traceback - from PyQt5.QtNetwork import QNetworkReply import qutebrowser diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index ca7d77bac..e4c6c3151 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -133,7 +133,7 @@ def safe_shlex_split(s): raise # eggs "bacon ham -> eggs "bacon ham" # eggs\ -> eggs\\ - if lexer.state not in "\"'\\": + if lexer.state not in lexer.escape + lexer.quotes: raise AssertionError( "Lexer state is >{}< while parsing >{}< (attempted fixup: " ">{}<)".format(lexer.state, orig_s, s)) @@ -141,8 +141,9 @@ def safe_shlex_split(s): else: return tokens # We should never arrive here. - raise AssertionError("Gave up splitting >{}< after {} tries. " - "Attempted fixup: >{}<.".format(orig_s, i, s)) + raise AssertionError( + "Gave up splitting >{}< after {} tries. Attempted fixup: >{}<.".format( + orig_s, i, s)) # pylint: disable=undefined-loop-variable def pastebin(text): @@ -560,7 +561,7 @@ class prevent_exceptions: # pylint: disable=invalid-name retval = self.retval @functools.wraps(func) - def wrapper(*args, **kwargs): + def wrapper(*args, **kwargs): # pylint: disable=missing-docstring try: return func(*args, **kwargs) except BaseException: diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 1db1a43f2..0d3f49ed3 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -124,7 +124,7 @@ def _module_versions(): """ lines = [] try: - import sipconfig + import sipconfig # pylint: disable=import-error,unused-variable except ImportError: pass else: