Fix lints
This commit is contained in:
parent
0811418746
commit
60b9d7e6c3
@ -206,8 +206,9 @@ def qute_settings(win_id, _request):
|
|||||||
confget=config_getter)
|
confget=config_getter)
|
||||||
return html.encode('UTF-8', errors='xmlcharrefreplace')
|
return html.encode('UTF-8', errors='xmlcharrefreplace')
|
||||||
|
|
||||||
|
|
||||||
@add_handler('pdfjs')
|
@add_handler('pdfjs')
|
||||||
def qute_pdfjs(win_id, request):
|
def qute_pdfjs(_win_id, request):
|
||||||
"""Handler for qute://pdfjs. Return the pdf.js viewer."""
|
"""Handler for qute://pdfjs. Return the pdf.js viewer."""
|
||||||
urlpath = request.url().path().lstrip('/')
|
urlpath = request.url().path().lstrip('/')
|
||||||
res_path = 'pdfjs/{}'.format(urlpath)
|
res_path = 'pdfjs/{}'.format(urlpath)
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
"""The main browser widgets."""
|
"""The main browser widgets."""
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import io
|
|
||||||
|
|
||||||
from PyQt5.QtCore import (pyqtSlot, pyqtSignal, PYQT_VERSION, Qt, QUrl, QPoint,
|
from PyQt5.QtCore import (pyqtSlot, pyqtSignal, PYQT_VERSION, Qt, QUrl, QPoint,
|
||||||
QTimer)
|
QTimer)
|
||||||
|
@ -96,12 +96,19 @@ def check_spelling():
|
|||||||
'[Ss]tatemachine', '[Mm]etaobject', '[Ll]ogrecord',
|
'[Ss]tatemachine', '[Mm]etaobject', '[Ll]ogrecord',
|
||||||
'[Ff]iletype'}
|
'[Ff]iletype'}
|
||||||
|
|
||||||
|
# Files which should be ignored, e.g. because they come from another
|
||||||
|
# package
|
||||||
|
ignored = [
|
||||||
|
os.path.join('.', 'scripts', 'dev', 'misc_checks.py'),
|
||||||
|
os.path.join('.', 'qutebrowser', 'pdfjs'),
|
||||||
|
]
|
||||||
|
|
||||||
seen = collections.defaultdict(list)
|
seen = collections.defaultdict(list)
|
||||||
try:
|
try:
|
||||||
ok = True
|
ok = True
|
||||||
for fn in _get_files():
|
for fn in _get_files():
|
||||||
with tokenize.open(fn) as f:
|
with tokenize.open(fn) as f:
|
||||||
if fn == os.path.join('.', 'scripts', 'dev', 'misc_checks.py'):
|
if any(fn.startswith(i) for i in ignored):
|
||||||
continue
|
continue
|
||||||
for line in f:
|
for line in f:
|
||||||
for w in words:
|
for w in words:
|
||||||
|
Loading…
Reference in New Issue
Block a user