From: Rob Woolley <rob.woolley@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Cc: <alex.kanavin@gmail.com>
Subject: [PATCH v2 02/13] bitbake-setup: Fix ambiguous variable names
Date: Tue, 31 Mar 2026 09:06:52 -0700 [thread overview]
Message-ID: <20260331160703.3137930-3-rob.woolley@windriver.com> (raw)
In-Reply-To: <20260331160703.3137930-1-rob.woolley@windriver.com>
The ruff lint tool detected use of ambiguous variables that
were named with a single letter:
E741 Ambiguous variable name: `l`
E741 Ambiguous variable name: `f`
This replaces the variables with a descriptive variable to add
clarity.
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
---
bin/bitbake-setup | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 304fbe6cc..313962cd4 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -248,11 +248,11 @@ bitbake-setup init -L {} /path/to/repo/checkout""".format(
if oesetupbuild:
links = {'setup-build': oesetupbuild, 'oe-scripts': os.path.dirname(oesetupbuild), 'oe-init-build-env-dir': oeinitbuildenvdir}
- for l,t in links.items():
- symlink = os.path.join(layerdir, l)
+ for link,item in links.items():
+ symlink = os.path.join(layerdir, link)
if os.path.lexists(symlink):
os.remove(symlink)
- os.symlink(os.path.relpath(t,layerdir),symlink)
+ os.symlink(os.path.relpath(item,layerdir),symlink)
return layers_fixed_revisions
@@ -261,19 +261,19 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_c
os.makedirs(build_conf_dir)
layers_s = []
- for l in layers:
- l = os.path.join(layerdir, l)
- layers_s.append(" {} \\".format(l))
+ for layer in layers:
+ layer = os.path.join(layerdir, layer)
+ layers_s.append(" {} \\".format(layer))
- for l in filerelative_layers:
+ for layer in filerelative_layers:
if thisdir:
- l = os.path.join(thisdir, l)
+ layer = os.path.join(thisdir, layer)
else:
raise Exception("Configuration is using bb-layers-file-relative to specify " \
"a layer path relative to itself. This can be done only " \
"when the configuration is specified by its path on local " \
"disk, not when it's in a registry or is fetched over http.")
- layers_s.append(" {} \\".format(l))
+ layers_s.append(" {} \\".format(layer))
layers_s = "\n".join(layers_s)
bblayers_conf = """BBLAYERS ?= " \\
@@ -446,9 +446,9 @@ The bitbake configuration files (local.conf, bblayers.conf and more) can be foun
def get_registry_config(registry_path, id):
for root, _dirs, files in os.walk(registry_path):
- for f in files:
- if f.endswith('.conf.json') and id == get_config_name(f):
- return os.path.join(root, f)
+ for file in files:
+ if file.endswith('.conf.json') and id == get_config_name(file):
+ return os.path.join(root, file)
raise Exception("Unable to find {} in available configurations; use 'list' sub-command to see what is available".format(id))
def merge_overrides_into_sources(sources, overrides):
@@ -997,10 +997,10 @@ def list_registry(registry_path, with_expired):
json_data = {}
for root, _dirs, files in os.walk(registry_path):
- for f in files:
- if f.endswith('.conf.json'):
- config_name = get_config_name(f)
- config_data = json.load(open(os.path.join(root, f)))
+ for file in files:
+ if file.endswith('.conf.json'):
+ config_name = get_config_name(file)
+ config_data = json.load(open(os.path.join(root, file)))
config_desc = config_data["description"]
expiry_date = config_data.get("expires", None)
if expiry_date:
--
2.49.0
next prev parent reply other threads:[~2026-03-31 16:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 16:06 [PATCH v2 00/13] bitbake-setup PyPI Packaging Rob Woolley
2026-03-31 16:06 ` [PATCH v2 01/13] bitbake-setup: Resolve unused loop control variables Rob Woolley
2026-04-01 21:44 ` [bitbake-devel] " Richard Purdie
2026-03-31 16:06 ` Rob Woolley [this message]
2026-03-31 16:06 ` [PATCH v2 03/13] bitbake-setup: Set function default to None Rob Woolley
2026-04-01 21:43 ` [bitbake-devel] " Richard Purdie
2026-03-31 16:06 ` [PATCH v2 04/13] bitbake-setup: Add checks for version information Rob Woolley
2026-03-31 16:06 ` [PATCH v2 05/13] bitbake-setup: Add version option Rob Woolley
2026-03-31 16:06 ` [PATCH v2 06/13] bitbake-setup: Add the conditional script stanza Rob Woolley
2026-03-31 16:06 ` [PATCH v2 07/13] bitbake-setup: Add version check and catch exceptions Rob Woolley
2026-03-31 16:06 ` [PATCH v2 08/13] bitbake: Add checks for importing bb module Rob Woolley
2026-03-31 16:06 ` [PATCH v2 09/13] pypi: Add PyPI packaging for bitbake-setup Rob Woolley
2026-03-31 16:07 ` [PATCH v2 10/13] pypi: Add packaging documentation for developers Rob Woolley
2026-03-31 16:07 ` [PATCH v2 11/13] gitignore: Ignore temporary staging directory Rob Woolley
2026-03-31 16:07 ` [PATCH v2 12/13] lib: Vendorize bundled third-party libraries under bb._vendor Rob Woolley
2026-03-31 16:07 ` [PATCH v2 13/13] bb: Move codegen.py inside module Rob Woolley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260331160703.3137930-3-rob.woolley@windriver.com \
--to=rob.woolley@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox