Fix lint
This commit is contained in:
parent
be68f98ce7
commit
6774445497
@ -120,9 +120,9 @@ class _CrashDialog(QDialog):
|
|||||||
try:
|
try:
|
||||||
self._crash_info.append(("Contact info",
|
self._crash_info.append(("Contact info",
|
||||||
"User: {}".format(getuser())))
|
"User: {}".format(getuser())))
|
||||||
except Exception as e:
|
except Exception as e: # pylint: disable=broad-except
|
||||||
self._crash_info.append(("Contact info", "User: {}: {}".format(
|
self._crash_info.append(("Contact info", "User: {}: {}".format(
|
||||||
e.__class__.__name__, e)))
|
e.__class__.__name__, e)))
|
||||||
self._crash_info.append(("Version info", version()))
|
self._crash_info.append(("Version info", version()))
|
||||||
try:
|
try:
|
||||||
self._crash_info.append(("Config",
|
self._crash_info.append(("Config",
|
||||||
|
@ -186,7 +186,7 @@ class WebView(QWebView):
|
|||||||
hitresult: A QWebHitTestResult
|
hitresult: A QWebHitTestResult
|
||||||
"""
|
"""
|
||||||
# Beginnings of div-classes which are actually some kind of editor.
|
# Beginnings of div-classes which are actually some kind of editor.
|
||||||
DIV_CLASSES = ['CodeMirror', # Javascript editor over a textarea
|
div_classes = ['CodeMirror', # Javascript editor over a textarea
|
||||||
'kix-'] # Google Docs editor
|
'kix-'] # Google Docs editor
|
||||||
elem = hitresult.element()
|
elem = hitresult.element()
|
||||||
tag = elem.tagName().lower()
|
tag = elem.tagName().lower()
|
||||||
@ -213,7 +213,7 @@ class WebView(QWebView):
|
|||||||
log.webview.debug("div with classes {} clicked!".format(
|
log.webview.debug("div with classes {} clicked!".format(
|
||||||
elem.classes()))
|
elem.classes()))
|
||||||
for klass in elem.classes():
|
for klass in elem.classes():
|
||||||
if any([klass.startswith(e) for e in DIV_CLASSES]):
|
if any([klass.startswith(e) for e in div_classes]):
|
||||||
return True
|
return True
|
||||||
elif tag == 'span':
|
elif tag == 'span':
|
||||||
log.webview.debug("span with classes {} clicked!".format(
|
log.webview.debug("span with classes {} clicked!".format(
|
||||||
|
Loading…
Reference in New Issue
Block a user