Fix lint
This commit is contained in:
parent
6b14cda5d0
commit
8d781c68c9
@ -19,8 +19,9 @@
|
|||||||
|
|
||||||
"""Wrapper over a QWebEngineCertificateError."""
|
"""Wrapper over a QWebEngineCertificateError."""
|
||||||
|
|
||||||
|
# pylint: disable=no-name-in-module,import-error,useless-suppression
|
||||||
from PyQt5.QtWebEngineWidgets import QWebEngineCertificateError
|
from PyQt5.QtWebEngineWidgets import QWebEngineCertificateError
|
||||||
|
# pylint: enable=no-name-in-module,import-error,useless-suppression
|
||||||
|
|
||||||
from qutebrowser.utils import usertypes, utils, debug
|
from qutebrowser.utils import usertypes, utils, debug
|
||||||
|
|
||||||
|
@ -132,7 +132,8 @@ class WebEnginePage(QWebEnginePage):
|
|||||||
QWebEnginePage.Geolocation: ('content', 'geolocation'),
|
QWebEnginePage.Geolocation: ('content', 'geolocation'),
|
||||||
QWebEnginePage.MediaAudioCapture: ('content', 'media-capture'),
|
QWebEnginePage.MediaAudioCapture: ('content', 'media-capture'),
|
||||||
QWebEnginePage.MediaVideoCapture: ('content', 'media-capture'),
|
QWebEnginePage.MediaVideoCapture: ('content', 'media-capture'),
|
||||||
QWebEnginePage.MediaAudioVideoCapture: ('content', 'media-capture'),
|
QWebEnginePage.MediaAudioVideoCapture:
|
||||||
|
('content', 'media-capture'),
|
||||||
}
|
}
|
||||||
messages = {
|
messages = {
|
||||||
QWebEnginePage.Geolocation: 'access your location',
|
QWebEnginePage.Geolocation: 'access your location',
|
||||||
@ -232,7 +233,8 @@ class WebEnginePage(QWebEnginePage):
|
|||||||
# WORKAROUND
|
# WORKAROUND
|
||||||
# Can't override javaScriptPrompt with older PyQt versions
|
# Can't override javaScriptPrompt with older PyQt versions
|
||||||
# https://www.riverbankcomputing.com/pipermail/pyqt/2016-November/038293.html
|
# https://www.riverbankcomputing.com/pipermail/pyqt/2016-November/038293.html
|
||||||
def javaScriptPrompt(self, url, js_msg, default, result):
|
def javaScriptPrompt(self, url, js_msg, default):
|
||||||
|
"""Override javaScriptPrompt to use qutebrowser prompts."""
|
||||||
if self._is_shutting_down:
|
if self._is_shutting_down:
|
||||||
return (False, "")
|
return (False, "")
|
||||||
try:
|
try:
|
||||||
|
@ -98,6 +98,7 @@ def whitelist_generator():
|
|||||||
yield 'scripts.dev.pylint_checkers.config.' + attr
|
yield 'scripts.dev.pylint_checkers.config.' + attr
|
||||||
|
|
||||||
yield 'scripts.dev.pylint_checkers.modeline.process_module'
|
yield 'scripts.dev.pylint_checkers.modeline.process_module'
|
||||||
|
yield 'scripts.dev.pylint_checkers.qute_pylint.config.msgs'
|
||||||
|
|
||||||
for attr in ['_get_default_metavar_for_optional',
|
for attr in ['_get_default_metavar_for_optional',
|
||||||
'_get_default_metavar_for_positional', '_metavar_formatter']:
|
'_get_default_metavar_for_positional', '_metavar_formatter']:
|
||||||
|
@ -235,7 +235,8 @@ class QuteProc(testprocess.Process):
|
|||||||
except testprocess.InvalidLine:
|
except testprocess.InvalidLine:
|
||||||
if not line.strip():
|
if not line.strip():
|
||||||
return None
|
return None
|
||||||
elif is_ignored_qt_message(line) or is_ignored_lowlevel_message(line):
|
elif (is_ignored_qt_message(line) or
|
||||||
|
is_ignored_lowlevel_message(line)):
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user