1
0

apibuild: Fix indentation not multiple of 4

PEP8 recommends that the number of spaces used for indentation of
Python code to be a multiple of four [1] [2].

1: https://lintlyci.github.io/Flake8Rules/rules/E111.html
2: https://lintlyci.github.io/Flake8Rules/rules/E114.html

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
Radostin Stoyanov 2018-03-20 06:49:00 +00:00 committed by Daniel P. Berrangé
parent aad30c3e57
commit eb327e6c61

View File

@ -251,7 +251,8 @@ class index:
d = self.identifiers[name] d = self.identifiers[name]
d.update(header, module, type, lineno, info, extra, conditionals) d.update(header, module, type, lineno, info, extra, conditionals)
except: except:
d = identifier(name, header, module, type, lineno, info, extra, conditionals) d = identifier(name, header, module, type, lineno, info, extra,
conditionals)
self.identifiers[name] = d self.identifiers[name] = d
if d is not None and static == 1: if d is not None and static == 1:
@ -265,7 +266,8 @@ class index:
return d return d
def add(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals=None): def add(self, name, header, module, static, type, lineno, info=None,
extra=None, conditionals=None):
if name[0:2] == '__': if name[0:2] == '__':
return None return None
d = None d = None
@ -273,7 +275,8 @@ class index:
d = self.identifiers[name] d = self.identifiers[name]
d.update(header, module, type, lineno, info, extra, conditionals) d.update(header, module, type, lineno, info, extra, conditionals)
except: except:
d = identifier(name, header, module, type, lineno, info, extra, conditionals) d = identifier(name, header, module, type, lineno, info, extra,
conditionals)
self.identifiers[name] = d self.identifiers[name] = d
if d is not None and static == 1: if d is not None and static == 1:
@ -389,7 +392,8 @@ class index:
" for %s:" % id) " for %s:" % id)
self.warning(" H: %s" % self.functions[id].conditionals) self.warning(" H: %s" % self.functions[id].conditionals)
self.warning(" C: %s" % up.conditionals) self.warning(" C: %s" % up.conditionals)
self.functions[id].update(None, up.module, up.type, up.info, up.extra) self.functions[id].update(None, up.module, up.type, up.info,
up.extra)
# else: # else:
# print("Function %s from %s is not declared in headers" % ( # print("Function %s from %s is not declared in headers" % (
# id, idx.functions[id].module)) # id, idx.functions[id].module))