mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-13 17:39:57 +00:00
PEP8 double aggressive E701, E70 and E502
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+14
-7
@@ -353,7 +353,8 @@ if __name__ == "__main__":
|
|||||||
# ignore empty lines
|
# ignore empty lines
|
||||||
if line.isspace() or line is '':
|
if line.isspace() or line is '':
|
||||||
# flush comments into the olines
|
# flush comments into the olines
|
||||||
for c in commentBloc: olines.append(c)
|
for c in commentBloc:
|
||||||
|
olines.append(c)
|
||||||
commentBloc = []
|
commentBloc = []
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -370,7 +371,8 @@ if __name__ == "__main__":
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if var in seen_vars:
|
if var in seen_vars:
|
||||||
for c in commentBloc: seen_vars[var].append(c)
|
for c in commentBloc:
|
||||||
|
seen_vars[var].append(c)
|
||||||
commentBloc = []
|
commentBloc = []
|
||||||
seen_vars[var].append(line)
|
seen_vars[var].append(line)
|
||||||
else:
|
else:
|
||||||
@@ -389,24 +391,29 @@ if __name__ == "__main__":
|
|||||||
if not in_routine:
|
if not in_routine:
|
||||||
print ("## Warning: unknown variable/routine \"%s\"" % originalLine.rstrip('\n'))
|
print ("## Warning: unknown variable/routine \"%s\"" % originalLine.rstrip('\n'))
|
||||||
var = 'others'
|
var = 'others'
|
||||||
for c in commentBloc: seen_vars[var].append(c)
|
for c in commentBloc:
|
||||||
|
seen_vars[var].append(c)
|
||||||
commentBloc = []
|
commentBloc = []
|
||||||
seen_vars[var].append(line)
|
seen_vars[var].append(line)
|
||||||
if not keep and not in_routine: var = ""
|
if not keep and not in_routine:
|
||||||
|
var = ""
|
||||||
|
|
||||||
# -- dump the sanitized .bb file --
|
# -- dump the sanitized .bb file --
|
||||||
addEmptyLine = False
|
addEmptyLine = False
|
||||||
# write comments that are not related to variables nor routines
|
# write comments that are not related to variables nor routines
|
||||||
for l in commentBloc: olines.append(l)
|
for l in commentBloc:
|
||||||
|
olines.append(l)
|
||||||
# write variables and routines
|
# write variables and routines
|
||||||
previourVarPrefix = "unknown"
|
previourVarPrefix = "unknown"
|
||||||
for k in OE_vars:
|
for k in OE_vars:
|
||||||
if k=='SRC_URI': addEmptyLine = True
|
if k=='SRC_URI':
|
||||||
|
addEmptyLine = True
|
||||||
if seen_vars[k] != []:
|
if seen_vars[k] != []:
|
||||||
if addEmptyLine and not k.startswith(previourVarPrefix):
|
if addEmptyLine and not k.startswith(previourVarPrefix):
|
||||||
olines.append("")
|
olines.append("")
|
||||||
for l in seen_vars[k]:
|
for l in seen_vars[k]:
|
||||||
olines.append(l)
|
olines.append(l)
|
||||||
previourVarPrefix = k.split('_')[0]=='' and "unknown" or k.split('_')[0]
|
previourVarPrefix = k.split('_')[0]=='' and "unknown" or k.split('_')[0]
|
||||||
for line in olines: print(line)
|
for line in olines:
|
||||||
|
print(line)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user