Fix some LGTM issues

Closes #4678
This commit is contained in:
Florian Bruhin 2020-04-30 12:36:52 +02:00
parent 63bc898dd1
commit 70f4b2aaf2
7 changed files with 3 additions and 11 deletions

View File

@ -14,7 +14,6 @@ https://ocefpaf.github.io/python4oceanographers/blog/2014/05/19/doi2bibtex/
import os
import sys
import shutil
import re
from collections import Counter
from urllib import parse as url_parse

View File

@ -46,10 +46,8 @@ WARNING: The login details are viewable as plaintext in qutebrowser's debug log
import argparse
import enum
import fnmatch
import functools
import os
import re
import shlex
import subprocess
import sys

View File

@ -39,10 +39,8 @@ you decide to submit a crash report!"""
import argparse
import enum
import fnmatch
import functools
import os
import re
import shlex
import subprocess
import sys

View File

@ -59,7 +59,7 @@ const HEADER = `
</head>`;
const scriptsDir = path.join(process.env.QUTE_DATA_DIR, 'userscripts');
const tmpFile = path.join(scriptsDir, '/readability.html');
const domOpts = {url: process.env.QUTE_URL, contentType: "text/html; charset=utf-8"}
const domOpts = {url: process.env.QUTE_URL, contentType: "text/html; charset=utf-8"};
if (!fs.existsSync(scriptsDir)){
fs.mkdirSync(scriptsDir);

View File

@ -173,7 +173,6 @@ def init(*, args: argparse.Namespace) -> None:
def _init_icon():
"""Initialize the icon of qutebrowser."""
icon = QIcon()
fallback_icon = QIcon()
for size in [16, 24, 32, 48, 64, 96, 128, 256, 512]:
filename = ':/icons/qutebrowser-{size}x{size}.png'.format(size=size)

View File

@ -241,7 +241,7 @@ function timeRange() {
}
break;
default:
throw 'timeRange: bad number of arguments'
throw 'timeRange: bad number of arguments';
}
}

View File

@ -170,9 +170,7 @@ def _get_tab_registry(win_id: _WindowTab,
if window is None or not hasattr(window, 'win_id'):
raise RegistryUnavailableError('tab')
win_id = window.win_id
elif win_id is not None:
window = window_registry[win_id]
else:
elif win_id is None:
raise TypeError("window is None with scope tab!")
if tab_id == 'current':