Fix pylint/flake8 for sql work.
This commit is contained in:
parent
8ff45331df
commit
3e63b62d6e
@ -20,13 +20,11 @@
|
||||
"""Simple history which gets written to disk."""
|
||||
|
||||
import time
|
||||
import os
|
||||
|
||||
from PyQt5.QtCore import pyqtSignal, pyqtSlot, QUrl
|
||||
|
||||
from qutebrowser.commands import cmdutils
|
||||
from qutebrowser.utils import (utils, objreg, standarddir, log, qtutils,
|
||||
usertypes, message)
|
||||
from qutebrowser.utils import utils, objreg, log, qtutils, usertypes, message
|
||||
from qutebrowser.misc import objects, sql
|
||||
|
||||
|
||||
@ -201,7 +199,7 @@ class WebHistory(sql.SqlTable):
|
||||
|
||||
def read(self, path):
|
||||
"""Import a text file into the sql database."""
|
||||
with open(path, 'r') as f:
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
rows = []
|
||||
for line in f:
|
||||
try:
|
||||
|
@ -21,7 +21,7 @@ import os.path
|
||||
|
||||
import pytest_bdd as bdd
|
||||
|
||||
from PyQt5.QtSql import QSqlDatabase, QSqlQuery
|
||||
from PyQt5.QtSql import QSqlDatabase
|
||||
|
||||
bdd.scenarios('history.feature')
|
||||
|
||||
|
@ -22,8 +22,6 @@
|
||||
import logging
|
||||
|
||||
import pytest
|
||||
import hypothesis
|
||||
from hypothesis import strategies
|
||||
from PyQt5.QtCore import QUrl
|
||||
|
||||
from qutebrowser.browser import history
|
||||
|
Loading…
Reference in New Issue
Block a user