Fix pylint errors.
This commit is contained in:
parent
cf23f42b99
commit
1fe1813431
@ -57,7 +57,7 @@ from qutebrowser.misc import (readline, ipc, savemanager, sessions,
|
||||
crashsignal, earlyinit, objects, sql)
|
||||
from qutebrowser.misc import utilcmds # pylint: disable=unused-import
|
||||
from qutebrowser.utils import (log, version, message, utils, qtutils, urlutils,
|
||||
objreg, usertypes, standarddir, error, debug)
|
||||
objreg, usertypes, standarddir, error)
|
||||
# We import utilcmds to run the cmdutils.register decorators.
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ import re
|
||||
from PyQt5.QtCore import QSortFilterProxyModel
|
||||
from PyQt5.QtGui import QStandardItem, QStandardItemModel
|
||||
|
||||
from qutebrowser.utils import qtutils, debug, log
|
||||
from qutebrowser.utils import qtutils
|
||||
|
||||
|
||||
class ListCategory(QSortFilterProxyModel):
|
||||
|
@ -64,7 +64,6 @@ class SqlCategory(QSqlQueryModel):
|
||||
querystr += ' order by {} {}'.format(sort_by, sort_order)
|
||||
|
||||
self._query = sql.Query(querystr, forward_only=False)
|
||||
self._param_count = len(filter_fields)
|
||||
|
||||
# map filter_fields to indices
|
||||
col_query = sql.Query('SELECT * FROM {} LIMIT 1'.format(name))
|
||||
|
@ -194,7 +194,7 @@ class SqlTable(QObject):
|
||||
values: A list of values to insert.
|
||||
replace: If set, replace existing values.
|
||||
"""
|
||||
paramstr = ','.join(':{}'.format(key) for key in values.keys())
|
||||
paramstr = ','.join(':{}'.format(key) for key in values)
|
||||
q = Query("INSERT INTO {} values({})".format(self._name, paramstr))
|
||||
q.run(**values)
|
||||
self.changed.emit()
|
||||
@ -206,7 +206,7 @@ class SqlTable(QObject):
|
||||
values: A list of values to insert.
|
||||
replace: If set, replace existing values.
|
||||
"""
|
||||
paramstr = ','.join(':{}'.format(key) for key in values.keys())
|
||||
paramstr = ','.join(':{}'.format(key) for key in values)
|
||||
q = Query("REPLACE INTO {} values({})".format(self._name, paramstr))
|
||||
q.run(**values)
|
||||
self.changed.emit()
|
||||
|
@ -18,9 +18,7 @@
|
||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import logging
|
||||
import os.path
|
||||
import re
|
||||
import tempfile
|
||||
|
||||
import pytest_bdd as bdd
|
||||
|
||||
|
@ -158,8 +158,7 @@ def hist_interface(hist):
|
||||
from qutebrowser.browser.webkit import webkithistory
|
||||
QWebHistoryInterface = QtWebKit.QWebHistoryInterface
|
||||
# pylint: enable=invalid-name
|
||||
entry = history.Entry(atime=0, url=QUrl('http://www.example.com/'),
|
||||
title='example')
|
||||
hist.add_url(url=QUrl('http://www.example.com/'), title='example')
|
||||
interface = webkithistory.WebHistoryInterface(hist)
|
||||
QWebHistoryInterface.setDefaultInterface(interface)
|
||||
yield
|
||||
|
Loading…
Reference in New Issue
Block a user