mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
bitbake: lib: fix most undefined code picked up by pylint
Correctly import, and inherit functions, and variables. Also fix some typos and remove some Python 2 code that isn't recognised. (Bitbake rev: b0c807be5c2170c9481c1a04d4c11972135d7dc5) Signed-off-by: Frazer Clews <frazerleslieclews@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ac3593f6ed
commit
abc6f864b9
@@ -705,11 +705,7 @@ class LexerReflect(object):
|
||||
|
||||
# Sort the functions by line number
|
||||
for f in self.funcsym.values():
|
||||
if sys.version_info[0] < 3:
|
||||
f.sort(lambda x,y: cmp(func_code(x[1]).co_firstlineno,func_code(y[1]).co_firstlineno))
|
||||
else:
|
||||
# Python 3.0
|
||||
f.sort(key=lambda x: func_code(x[1]).co_firstlineno)
|
||||
f.sort(key=lambda x: func_code(x[1]).co_firstlineno)
|
||||
|
||||
# Sort the strings by regular expression length
|
||||
for s in self.strsym.values():
|
||||
|
||||
@@ -1205,7 +1205,7 @@ class Production(object):
|
||||
|
||||
# Precompute the list of productions immediately following. Hack. Remove later
|
||||
try:
|
||||
p.lr_after = Prodnames[p.prod[n+1]]
|
||||
p.lr_after = self.Prodnames[p.prod[n+1]]
|
||||
except (IndexError,KeyError):
|
||||
p.lr_after = []
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user