build: Fix all style reports by pycodestyle v2.4.0

pycodestyle v2.4.0 checks for W606 (async deprecated), but
we can't disable it on source code level with '# noqa'. Let's disable
the check globaly. We will still catch it with pylint.

By disabling the W606 we need also to list the W503 which was
previously active.

While at it fix following things:

./docs/conf.py:252:6: E121 continuation line under-indented for hanging indent
./docs/conf.py:257:6: E126 continuation line over-indented for hanging indent
./kas/build.py:123:17: W504 line break after binary operator
./kas/configschema.py:48:25: E123 closing bracket does not match indentation of opening bracket's line
./kas/configschema.py:49:21: E123 closing bracket does not match indentation of opening bracket's line
./tests/test_includehandler.py:82:13: E123 closing bracket does not match indentation of opening bracket's line
./tests/test_includehandler.py:121:13: E123 closing bracket does not match indentation of opening bracket's line

Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This commit is contained in:
Daniel Wagner 2018-05-17 12:44:11 +02:00
parent 03ad285919
commit c1e5c4f379
5 changed files with 20 additions and 20 deletions

View File

@ -249,27 +249,27 @@ htmlhelp_basename = 'kasdoc'
html_context = {
'extra_css_files': [
'_static/theme_overrides.css', # override wide tables in RTD theme
],
],
}
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples

View File

@ -120,6 +120,6 @@ class BuildCommand(Command):
"""
# Start bitbake build of image
bitbake = find_program(config.environ['PATH'], 'bitbake')
run_cmd([bitbake, '-k', '-c', config.get_bitbake_task()] +
config.get_bitbake_targets(),
run_cmd(([bitbake, '-k', '-c', config.get_bitbake_task()]
+ config.get_bitbake_targets()),
env=config.environ, cwd=config.build_dir)

View File

@ -45,8 +45,8 @@ CONFIGSCHEMA = {
{
'type': 'integer',
},
],
},
],
},
'includes': {
'type': 'array',
'items': {

View File

@ -3,7 +3,7 @@
ERROR=0
echo "Checking with pycodestyle"
pycodestyle $1/*.py $1/*/*.py || ERROR=$(expr $ERROR + 1)
pycodestyle --ignore=W503,W606 $1/*.py $1/*/*.py || ERROR=$(expr $ERROR + 1)
echo "Checking with pylint"
pylint $1/*.py $1/*/*.py || ERROR=$(expr $ERROR + 2)

View File

@ -79,7 +79,7 @@ class TestLoadConfig(object):
('a', exception),
('1', exception),
('a:', exception)
]
]
self.util_exception_content(testvector)
@ -118,7 +118,7 @@ class TestLoadConfig(object):
testvector = [
'header: {version: 4}',
'header: {version: 5}',
]
]
for string in testvector:
with patch_open(includehandler, string=string):
includehandler.load_config('x.yml')