scripts: Fix random typo'd whitespace

Reported by pylint's 'bad-whitespace' warning.

Not gonna enable this warning in the CI check, because it flags stuff
like deliberately aligning assignments and gets too cultish. Just a
cleanup pass.

For whatever reason, the common convention in Python is to skip spaces
around '=' when passing keyword arguments and giving default arguments:

    f(x=3, y=4)
    def f(x, y=8):
        ...

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2019-09-06 11:13:19 +02:00 committed by Anas Nashif
commit 0d39a10fbb
14 changed files with 22 additions and 22 deletions

View file

@ -101,7 +101,7 @@ precedence = (
('left', 'OR'),
('left', 'AND'),
('right', 'NOT'),
('nonassoc' , 'EQUALS', 'NOTEQUALS', 'GT', 'LT', 'GTEQ', 'LTEQ', 'IN'),
('nonassoc', 'EQUALS', 'NOTEQUALS', 'GT', 'LT', 'GTEQ', 'LTEQ', 'IN'),
)
def p_expr_or(p):

View file

@ -31,7 +31,7 @@ class Harness:
if config:
self.type = config.get('type', None)
self.regex = config.get('regex', [] )
self.regex = config.get('regex', [])
self.repeat = config.get('repeat', 1)
self.ordered = config.get('ordered', True)

View file

@ -26,12 +26,12 @@ for section in config.sections():
else:
tc[opt] = value
test = { section : tc}
test = {section : tc}
tests.append(test)
y['tests'] = tests
if sample:
y['sample'] = { 'name': "TBD", 'description': "TBD" }
y['sample'] = {'name': "TBD", 'description': "TBD"}
with open(out_file, "w") as f:
yaml.dump(y, f, width=50, indent=4, default_flow_style=False)
yaml.dump(y, f, width=50, indent=4, default_flow_style=False)

View file

@ -46,8 +46,8 @@ try:
def _yaml_validate(data, schema):
if not schema:
return
c = pykwalify.core.Core(source_data = data, schema_data = schema)
c.validate(raise_exception = True)
c = pykwalify.core.Core(source_data=data, schema_data=schema)
c.validate(raise_exception=True)
except ImportError as e:
log.warning("can't import pykwalify; won't validate YAML (%s)", e)