flake8: Add pep8-naming plugin.

Check PEP-8 naming conventions, plugin for flake8
https://pypi.python.org/pypi/pep8-naming/
This commit is contained in:
Florian Bruhin 2016-01-21 22:16:24 +01:00
parent 7e3507aba1
commit fccde768ed
8 changed files with 9 additions and 7 deletions

View File

@ -30,7 +30,7 @@ class FixedDataNetworkReply(QNetworkReply):
"""QNetworkReply subclass for fixed data."""
def __init__(self, request, fileData, mimeType, parent=None):
def __init__(self, request, fileData, mimeType, parent=None): # noqa
"""Constructor.
Args:

View File

@ -91,7 +91,7 @@ def check_exclusive(flags, names):
argstr))
class register: # pylint: disable=invalid-name
class register: # noqa # pylint: disable=invalid-name
"""Decorator to register a new command handler.

View File

@ -46,7 +46,7 @@ from qutebrowser.utils.usertypes import Completion
UNSET = object()
class change_filter: # pylint: disable=invalid-name
class change_filter: # noqa # pylint: disable=invalid-name
"""Decorator to filter calls based on a config section/option matching.

View File

@ -65,7 +65,7 @@ class NotInModeError(Exception):
def init(win_id, parent):
"""Initialize the mode manager and the keyparsers for the given win_id."""
KM = usertypes.KeyMode # pylint: disable=invalid-name
KM = usertypes.KeyMode # noqa # pylint: disable=invalid-name
modeman = ModeManager(win_id, parent)
objreg.register('mode-manager', modeman, scope='window', window=win_id)
keyparsers = {

View File

@ -224,7 +224,7 @@ def format_call(func, args=None, kwargs=None, full=True):
return '{}({})'.format(name, format_args(args, kwargs))
class log_time: # pylint: disable=invalid-name
class log_time: # noqa pylint: disable=invalid-name
"""Log the time an operation takes.

View File

@ -563,7 +563,7 @@ def disabled_excepthook():
sys.excepthook = old_excepthook
class prevent_exceptions: # pylint: disable=invalid-name
class prevent_exceptions: # noqa # pylint: disable=invalid-name
"""Decorator to ignore and log exceptions.

View File

@ -7,5 +7,6 @@ exclude = .venv,.hypothesis,.git,__pycache__,resources.py
# E402: module level import not at top of file
# E266: too many leading '#' for block comment
# F401: Unused import
ignore = E128,E226,E265,E501,E402,E266,F401
# N802: function name should be lowercase
ignore = E128,E226,E265,E501,E402,E266,F401,N802
max-complexity = 12

View File

@ -154,6 +154,7 @@ deps =
-r{toxinidir}/requirements.txt
flake8==2.5.1
flake8-debugger==1.4.0
pep8-naming==0.3.3
mccabe==0.3.1
pep8==1.7.0
pyflakes==1.0.0