From 984dd1ba8c5ae7b9bd940cc6cf241ab3218f1f61 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 24 Oct 2017 09:37:10 +0200 Subject: [PATCH] Fix remaining pylint/flake8 issues --- scripts/dev/src2asciidoc.py | 16 ++++++++-------- tests/unit/config/test_configfiles.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/dev/src2asciidoc.py b/scripts/dev/src2asciidoc.py index 46317142e..a112b60d4 100755 --- a/scripts/dev/src2asciidoc.py +++ b/scripts/dev/src2asciidoc.py @@ -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: diff --git a/tests/unit/config/test_configfiles.py b/tests/unit/config/test_configfiles.py index 776356fef..b03097266 100644 --- a/tests/unit/config/test_configfiles.py +++ b/tests/unit/config/test_configfiles.py @@ -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