From: Rob Woolley <rob.woolley@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Cc: <alex.kanavin@gmail.com>
Subject: [PATCH 02/11] bitbake-setup: Resolve unused loop control variables
Date: Thu, 26 Mar 2026 11:57:33 -0700 [thread overview]
Message-ID: <20260326185742.542268-3-rob.woolley@windriver.com> (raw)
In-Reply-To: <20260326185742.542268-1-rob.woolley@windriver.com>
The ruff lint tool reported loop control variables that were
not being used:
B007 Loop control variable `dirs` not used within loop body
Adding underscore as a prefix helps indicate that it is not
being used inside the loop.
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
---
bin/bitbake-setup | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 212da4f88..60d324b39 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -133,7 +133,7 @@ def commit_config(config_dir):
def _write_layer_list(dest, repodirs):
layers = []
for r in repodirs:
- for root, dirs, files in os.walk(os.path.join(dest,r)):
+ for root, _dirs, files in os.walk(os.path.join(dest,r)):
if os.path.basename(root) == 'conf' and 'layer.conf' in files:
layers.append(os.path.relpath(os.path.dirname(root), dest))
layers_f = os.path.join(dest, ".oe-layers.json")
@@ -414,7 +414,7 @@ The bitbake configuration files (local.conf, bblayers.conf and more) can be foun
logger.plain("The bitbake configuration files (local.conf, bblayers.conf and more) can be found in\n {}/conf\n".format(bitbake_builddir))
def get_registry_config(registry_path, id):
- for root, dirs, files in os.walk(registry_path):
+ 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)
@@ -818,7 +818,7 @@ def has_expired(expiry_date):
def list_registry(registry_path, with_expired):
json_data = {}
- for root, dirs, files in os.walk(registry_path):
+ for root, _dirs, files in os.walk(registry_path):
for f in files:
if f.endswith('.conf.json'):
config_name = get_config_name(f)
--
2.39.5
next prev parent reply other threads:[~2026-03-26 18:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 18:57 BitBake Linting Errors Rob Woolley
2026-03-26 18:57 ` [PATCH 01/11] bitbake-setup: Remove extraneous variable from str.format() Rob Woolley
2026-03-26 18:57 ` Rob Woolley [this message]
2026-03-26 18:57 ` [PATCH 03/11] bitbake-setup: Fix ambiguous variable names Rob Woolley
2026-03-26 18:57 ` [PATCH 04/11] bitbake-setup: Remove unused stdout variable Rob Woolley
2026-03-26 18:57 ` [PATCH 05/11] bitbake-setup: Replace f-string without placeholders Rob Woolley
2026-03-26 18:57 ` [PATCH 06/11] bitbake-setup: Remove unused Namespace import Rob Woolley
2026-03-26 18:57 ` [PATCH 07/11] bitbake-setup: Remove unused parser_settings_list Rob Woolley
2026-03-26 18:57 ` [PATCH 08/11] bitbake-setup: Fix linting error related to membership Rob Woolley
2026-03-26 18:57 ` [PATCH 09/11] bitbake-setup: Maintain exception chain Rob Woolley
2026-03-26 18:57 ` [PATCH 10/11] bitbake-setup: Set function default to None Rob Woolley
2026-03-30 16:34 ` [bitbake-devel] " adrian.freihofer
2026-03-30 21:49 ` Woolley, Rob
2026-03-30 22:51 ` Richard Purdie
2026-03-26 18:57 ` [PATCH 11/11] bitbake-setup: Sort and format imports 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=20260326185742.542268-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.