From cf89ffa9710afacb0b928dadda74774ea42f3ce6 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Thu, 25 May 2017 07:27:14 -0400 Subject: [PATCH] Fix pylint/flake8 errors --- qutebrowser/completion/models/sqlcategory.py | 4 ++-- qutebrowser/misc/sql.py | 4 ++-- tests/unit/completion/test_completionmodel.py | 2 +- tests/unit/completion/test_models.py | 1 - tests/unit/utils/test_version.py | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qutebrowser/completion/models/sqlcategory.py b/qutebrowser/completion/models/sqlcategory.py index 543ea2ade..5b8cf4482 100644 --- a/qutebrowser/completion/models/sqlcategory.py +++ b/qutebrowser/completion/models/sqlcategory.py @@ -60,10 +60,10 @@ class SqlCategory(QSqlQueryModel): querystr += ' order by {} {}'.format(sort_by, sort_order) self._query = sql.Query(querystr) - self._param_count=len(filter_fields) + self._param_count = len(filter_fields) self.set_pattern('', [0]) - def set_pattern(self, pattern, columns_to_filter): + def set_pattern(self, pattern, _columns_to_filter): """Set the pattern used to filter results. Args: diff --git a/qutebrowser/misc/sql.py b/qutebrowser/misc/sql.py index 5acc620fb..0b81fc0f9 100644 --- a/qutebrowser/misc/sql.py +++ b/qutebrowser/misc/sql.py @@ -19,13 +19,13 @@ """Provides access to an in-memory sqlite database.""" +import collections + from PyQt5.QtCore import QObject, pyqtSignal from PyQt5.QtSql import QSqlDatabase, QSqlQuery from qutebrowser.utils import log -import collections - class SqlException(Exception): diff --git a/tests/unit/completion/test_completionmodel.py b/tests/unit/completion/test_completionmodel.py index 05af902a3..d3cd23f68 100644 --- a/tests/unit/completion/test_completionmodel.py +++ b/tests/unit/completion/test_completionmodel.py @@ -19,8 +19,8 @@ """Tests for CompletionModel.""" -import hypothesis from unittest import mock +import hypothesis from hypothesis import strategies from qutebrowser.completion.models import completionmodel diff --git a/tests/unit/completion/test_models.py b/tests/unit/completion/test_models.py index 8666ecc5b..c46287926 100644 --- a/tests/unit/completion/test_models.py +++ b/tests/unit/completion/test_models.py @@ -26,7 +26,6 @@ import pytest from PyQt5.QtCore import QUrl from PyQt5.QtWidgets import QTreeView -from qutebrowser.browser import history from qutebrowser.completion.models import miscmodels, urlmodel, configmodel from qutebrowser.config import sections, value from qutebrowser.misc import sql diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index c0c731f88..11bf326fb 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -798,6 +798,7 @@ def test_chromium_version_unpatched(qapp): assert version._chromium_version() not in ['', 'unknown', 'unavailable'] +# pylint: disable=too-many-locals @pytest.mark.parametrize(['git_commit', 'frozen', 'style', 'with_webkit', 'known_distribution'], [ (True, False, True, True, True), # normal