From c57ace2460d54fd7291feca4fddef39638d673fd Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 27 Nov 2022 16:18:15 +0000 Subject: [PATCH] bitbake: BBHandler: Remove pointless global variable declarations These are static regex compilations which don't change or a standard module import (bb). There is noneed to declare them as global so drop the pointless code which doesn't do anything. (Bitbake rev: 09a4c159e3fd184f730821e7bd99916b0d28dc70) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/BBHandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 18e6868387..584966fea1 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -102,7 +102,7 @@ def get_statements(filename, absolute_filename, base_name): return statements def handle(fn, d, include): - global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__, __classname__ + global __infunc__, __body__, __residue__, __classname__ __body__ = [] __infunc__ = [] __classname__ = "" @@ -154,7 +154,7 @@ def handle(fn, d, include): return d def feeder(lineno, s, fn, root, statements, eof=False): - global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __def_regexp__, __python_func_regexp__, __inpython__, __infunc__, __body__, bb, __residue__, __classname__ + global __inpython__, __infunc__, __body__, __residue__, __classname__ # Check tabs in python functions: # - def py_funcname(): covered by __inpython__