Fix some checks
This commit is contained in:
parent
4ca8cc9537
commit
e878fc538d
@ -57,7 +57,7 @@ from qutebrowser.commands.keys import KeyParser
|
|||||||
from qutebrowser.commands.parsers import CommandParser, SearchParser
|
from qutebrowser.commands.parsers import CommandParser, SearchParser
|
||||||
from qutebrowser.utils.appdirs import AppDirs
|
from qutebrowser.utils.appdirs import AppDirs
|
||||||
from qutebrowser.utils.misc import dotted_getattr
|
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):
|
class QuteBrowser(QApplication):
|
||||||
|
@ -100,7 +100,7 @@ class SearchParser(QObject):
|
|||||||
do_search: If a search should be started.
|
do_search: If a search should be started.
|
||||||
"""
|
"""
|
||||||
if self._text is not None:
|
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)
|
self.do_search.emit(self._text, self._flags)
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ class CompletionModel(QAbstractItemModel):
|
|||||||
except (IndexError, ValueError):
|
except (IndexError, ValueError):
|
||||||
return False
|
return False
|
||||||
# We explicitely need to select this version, see [1].
|
# 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, [])
|
self.dataChanged.emit(index, index, [])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class Style(QCommonStyle):
|
|||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
http://stackoverflow.com/a/17294081
|
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:
|
Attributes:
|
||||||
_style: The base/"parent" style.
|
_style: The base/"parent" style.
|
||||||
|
@ -249,7 +249,7 @@ class _Command(QLineEdit):
|
|||||||
|
|
||||||
# FIXME won't the tab key switch to the next widget?
|
# FIXME won't the tab key switch to the next widget?
|
||||||
# See [0] for a possible fix.
|
# 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):
|
def __init__(self, statusbar):
|
||||||
super().__init__(statusbar)
|
super().__init__(statusbar)
|
||||||
|
@ -99,9 +99,9 @@ class TabWidget(QTabWidget):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# pylint: disable=unused-argument
|
||||||
@pyqtSlot(str, str, object)
|
@pyqtSlot(str, str, object)
|
||||||
def on_config_changed(self, section, option, value):
|
def on_config_changed(self, section, option, value):
|
||||||
"""Update attributes when config changed."""
|
"""Update attributes when config changed."""
|
||||||
# pylint: disable=unused-argument
|
|
||||||
if section == 'tabbar':
|
if section == 'tabbar':
|
||||||
self._init_config()
|
self._init_config()
|
||||||
|
@ -539,7 +539,7 @@ class CurCommandDispatcher(QObject):
|
|||||||
count: How many pages to go back.
|
count: How many pages to go back.
|
||||||
"""
|
"""
|
||||||
# FIXME display warning if beginning of history
|
# FIXME display warning if beginning of history
|
||||||
for i in range(count): # pylint: disable=unused-variable
|
for _ in range(count):
|
||||||
self.tabs.currentWidget().back()
|
self.tabs.currentWidget().back()
|
||||||
|
|
||||||
@cmdutils.register(instance='mainwindow.tabs.cur')
|
@cmdutils.register(instance='mainwindow.tabs.cur')
|
||||||
@ -552,7 +552,7 @@ class CurCommandDispatcher(QObject):
|
|||||||
count: How many pages to go forward.
|
count: How many pages to go forward.
|
||||||
"""
|
"""
|
||||||
# FIXME display warning if end of history
|
# FIXME display warning if end of history
|
||||||
for i in range(count): # pylint: disable=unused-variable
|
for _ in range(count):
|
||||||
self.tabs.currentWidget().forward()
|
self.tabs.currentWidget().forward()
|
||||||
|
|
||||||
@pyqtSlot(str, int)
|
@pyqtSlot(str, int)
|
||||||
|
@ -67,6 +67,8 @@ options = {
|
|||||||
'flake8': [
|
'flake8': [
|
||||||
'E241', # Multiple spaces after ,
|
'E241', # Multiple spaces after ,
|
||||||
'E265', # Block comment should start with '#'
|
'E265', # Block comment should start with '#'
|
||||||
|
'F401', # Unused import (checked by pylint)
|
||||||
|
'E501', # Line too long (checked by pylint)
|
||||||
],
|
],
|
||||||
'pep257': [
|
'pep257': [
|
||||||
'D102', # Docstring missing, will be handled by others
|
'D102', # Docstring missing, will be handled by others
|
||||||
|
Loading…
Reference in New Issue
Block a user