This commit is contained in:
Florian Bruhin 2019-10-22 16:38:29 +02:00
parent 64424fb462
commit 1efb03018b
3 changed files with 9 additions and 4 deletions

View File

@ -32,6 +32,10 @@ from PyQt5.QtWidgets import QWidget, QApplication, QDialog
from PyQt5.QtPrintSupport import QPrintDialog, QPrinter
from PyQt5.QtNetwork import QNetworkAccessManager
if typing.TYPE_CHECKING:
from PyQt5.QtWebKit import QWebHistory
from PyQt5.QtWebEngineWidgets import QWebEngineHistory
import pygments
import pygments.lexers
import pygments.formatters
@ -47,8 +51,6 @@ from qutebrowser.qt import sip
if typing.TYPE_CHECKING:
from qutebrowser.browser import webelem
from qutebrowser.browser.inspector import AbstractWebInspector
from PyQt5.QtWebKit import QWebHistory
from PyQt5.QtWebEngineWidgets import QWebEngineHistory
tab_id_gen = itertools.count(0)

View File

@ -458,7 +458,7 @@ class AbstractDownloadItem(QObject):
self.fileobj = UnsupportedAttribute(
) # type: typing.Union[UnsupportedAttribute, typing.IO[bytes], None]
self.raw_headers = UnsupportedAttribute(
) # type: typing.Union[UnsupportedAttribute, typing.Dict[bytes, bytes]]
) # type: typing.Union[UnsupportedAttribute, typing.Dict[bytes,bytes]]
self._filename = None
self._dead = False

View File

@ -42,7 +42,10 @@ class ShellLexer:
self.escape = '\\'
self.escapedquotes = '"'
self.keep = False
self.reset()
self.quoted = False
self.escapedstate = ' '
self.token = ''
self.state = ' '
def reset(self):
"""Reset the state machine state to the defaults."""