Fix pylint errors.
This commit is contained in:
parent
9e6b0240f6
commit
cb6c6b814e
@ -29,7 +29,7 @@ import sys
|
||||
import time
|
||||
import urllib.parse
|
||||
|
||||
from PyQt5.QtCore import QUrl, QUrlQuery
|
||||
from PyQt5.QtCore import QUrlQuery
|
||||
|
||||
import qutebrowser
|
||||
from qutebrowser.utils import (version, utils, jinja, log, message, docutils,
|
||||
@ -203,7 +203,7 @@ def qute_history(url):
|
||||
if item_newer:
|
||||
continue
|
||||
else:
|
||||
# history_dict is not reversed, we are going forward in history.
|
||||
# history_dict isn't reversed, we are going forward in history.
|
||||
# so:
|
||||
# abort if item is newer than start_time
|
||||
# skip if item is older than start_time+24hrs
|
||||
|
@ -42,7 +42,7 @@ class TestJavascriptHandler:
|
||||
def patch_read_file(self, monkeypatch):
|
||||
"""Patch utils.read_file to return few fake JS files."""
|
||||
def _read_file(path, binary=False):
|
||||
"""Faked utils.read_file"""
|
||||
"""Faked utils.read_file."""
|
||||
assert not binary
|
||||
for filename, content in self.js_files:
|
||||
if path == os.path.join('javascript', filename):
|
||||
@ -75,13 +75,15 @@ class TestHistoryHandler:
|
||||
|
||||
"""Test the qute://history endpoint."""
|
||||
|
||||
# Current time
|
||||
now = time.time()
|
||||
|
||||
@pytest.fixture
|
||||
def entries(self):
|
||||
"""Create fake history entries."""
|
||||
# create 12 history items spaced 6 hours apart, starting from now
|
||||
entry_count = 12
|
||||
interval = 6 * 60 * 60
|
||||
self.now = time.time()
|
||||
|
||||
items = []
|
||||
for i in range(entry_count):
|
||||
|
Loading…
Reference in New Issue
Block a user