Fix remaining pylint/flake8 issues

This commit is contained in:
Florian Bruhin 2017-10-24 09:37:10 +02:00
parent 1d18e808b1
commit 984dd1ba8c
2 changed files with 9 additions and 9 deletions

View File

@ -155,13 +155,13 @@ def _get_setting_quickref():
def _get_configtypes():
"""Get configtypes classes to document."""
predicate = lambda e: (inspect.isclass(e) and
e not in [configtypes.BaseType,
configtypes.MappingType,
# pylint: disable=protected-access
configtypes._Numeric] and
# pylint: enable=protected-access
issubclass(e, configtypes.BaseType))
predicate = lambda e: (
inspect.isclass(e) and
# pylint: disable=protected-access
e not in [configtypes.BaseType, configtypes.MappingType,
configtypes._Numeric] and
# pylint: enable=protected-access
issubclass(e, configtypes.BaseType))
yield from inspect.getmembers(configtypes, predicate)
@ -504,7 +504,6 @@ def regenerate_manpage(filename):
# positionals, optionals and user-defined groups
# pylint: disable=protected-access
for group in parser._action_groups:
# pylint: enable=protected-access
groupdata = []
groupdata.append('=== {}'.format(group.title))
if group.description is not None:
@ -514,6 +513,7 @@ def regenerate_manpage(filename):
if action_data is not None:
groupdata.append(action_data)
groups.append('\n'.join(groupdata))
# pylint: enable=protected-access
options = '\n'.join(groups)
# epilog
if parser.epilog is not None:

View File

@ -109,7 +109,7 @@ class TestYaml:
# WORKAROUND for https://github.com/PyCQA/pylint/issues/574
# pylint: disable=superfluous-parens
if 'magenta' in (old_config or ''):
# pylint: enable=superfluous-parens
# pylint: enable=superfluous-parens
assert ' colors.hints.fg: magenta' in lines
if insert:
assert ' tabs.show: never' in lines