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:
Frazer Clews
2020-08-24 15:51:37 +01:00
committed by Richard Purdie
parent ac3593f6ed
commit abc6f864b9
22 changed files with 51 additions and 42 deletions

View File

@@ -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():

View File

@@ -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: