提交 c020473d 编写于 作者: C Cleber Rosa

avocado/core/loader.py: style fixes

With two different versions of pylint, style warnings were reported:

 avocado/core/loader.py:662:20: W503 line break before binary operator
 avocado/core/loader.py:668:20: W503 line break before binary operator
 avocado/core/loader.py:676:20: W503 line break before binary operator

Let's fix by breaking that into two statements.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 ac3fca8f
......@@ -658,22 +658,25 @@ class FileLoader(TestLoader):
docstring = ast.get_docstring(statement)
# Looking for a class that has in the docstring either
# ":avocado: enable" or ":avocado: disable
if (safeloader.check_docstring_directive(docstring, 'disable')
and class_name is None):
has_disable = safeloader.check_docstring_directive(docstring,
'disable')
if (has_disable and class_name is None):
continue
cl_tags = safeloader.get_docstring_directives_tags(docstring)
if (safeloader.check_docstring_directive(docstring, 'enable')
and class_name is None):
has_enable = safeloader.check_docstring_directive(docstring,
'enable')
if (has_enable and class_name is None):
info = self._get_methods_info(statement.body, cl_tags)
result[statement.name] = info
continue
# Looking for the 'recursive' docstring or a 'class_name'
# (meaning we are under recursion)
if (safeloader.check_docstring_directive(docstring, 'recursive')
or class_name is not None):
has_recurse = safeloader.check_docstring_directive(docstring,
'recursive')
if (has_recurse or class_name is not None):
info = self._get_methods_info(statement.body, cl_tags)
result[statement.name] = info
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册