Fix some checks

This commit is contained in:
Florian Bruhin 2014-04-16 10:02:34 +02:00
parent 4ca8cc9537
commit e878fc538d
8 changed files with 10 additions and 8 deletions

View File

@ -57,7 +57,7 @@ from qutebrowser.commands.keys import KeyParser
from qutebrowser.commands.parsers import CommandParser, SearchParser
from qutebrowser.utils.appdirs import AppDirs
from qutebrowser.utils.misc import dotted_getattr
from qutebrowser.utils.debug import set_trace # noqa pylint: disable=unused-import
from qutebrowser.utils.debug import set_trace # pylint: disable=unused-import
class QuteBrowser(QApplication):

View File

@ -100,7 +100,7 @@ class SearchParser(QObject):
do_search: If a search should be started.
"""
if self._text is not None:
for i in range(count): # pylint: disable=unused-variable
for _ in range(count):
self.do_search.emit(self._text, self._flags)

View File

@ -243,7 +243,7 @@ class CompletionModel(QAbstractItemModel):
except (IndexError, ValueError):
return False
# We explicitely need to select this version, see [1].
# [1] http://python.6.x6.nabble.com/Bug-Report-pyqt5-discard-silently-signal-with-missing-optional-parameters-dataChanged-roles-for-exam-tt5043737.html # noqa pylint: disable=line-too-long
# [1] http://python.6.x6.nabble.com/Bug-Report-pyqt5-discard-silently-signal-with-missing-optional-parameters-dataChanged-roles-for-exam-tt5043737.html # pylint: disable=line-too-long
self.dataChanged.emit(index, index, [])
return True

View File

@ -35,7 +35,7 @@ class Style(QCommonStyle):
Based on:
http://stackoverflow.com/a/17294081
https://code.google.com/p/makehuman/source/browse/trunk/makehuman/lib/qtgui.py # noqa # pylint: disable=line-too-long
https://code.google.com/p/makehuman/source/browse/trunk/makehuman/lib/qtgui.py # pylint: disable=line-too-long
Attributes:
_style: The base/"parent" style.

View File

@ -249,7 +249,7 @@ class _Command(QLineEdit):
# FIXME won't the tab key switch to the next widget?
# See [0] for a possible fix.
# [0] http://www.saltycrane.com/blog/2008/01/how-to-capture-tab-key-press-event-with/ # noqa # pylint: disable=line-too-long
# [0] http://www.saltycrane.com/blog/2008/01/how-to-capture-tab-key-press-event-with/ # pylint: disable=line-too-long
def __init__(self, statusbar):
super().__init__(statusbar)

View File

@ -99,9 +99,9 @@ class TabWidget(QTabWidget):
except KeyError:
pass
# pylint: disable=unused-argument
@pyqtSlot(str, str, object)
def on_config_changed(self, section, option, value):
"""Update attributes when config changed."""
# pylint: disable=unused-argument
if section == 'tabbar':
self._init_config()

View File

@ -539,7 +539,7 @@ class CurCommandDispatcher(QObject):
count: How many pages to go back.
"""
# FIXME display warning if beginning of history
for i in range(count): # pylint: disable=unused-variable
for _ in range(count):
self.tabs.currentWidget().back()
@cmdutils.register(instance='mainwindow.tabs.cur')
@ -552,7 +552,7 @@ class CurCommandDispatcher(QObject):
count: How many pages to go forward.
"""
# FIXME display warning if end of history
for i in range(count): # pylint: disable=unused-variable
for _ in range(count):
self.tabs.currentWidget().forward()
@pyqtSlot(str, int)

View File

@ -67,6 +67,8 @@ options = {
'flake8': [
'E241', # Multiple spaces after ,
'E265', # Block comment should start with '#'
'F401', # Unused import (checked by pylint)
'E501', # Line too long (checked by pylint)
],
'pep257': [
'D102', # Docstring missing, will be handled by others