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