[PATCH v3 01/10] bitbake-setup: Resolve unused loop control variables
Rob Woolley <[email protected]> Tue, 16 Jun 2026 14:31:21 -0700
| Newsgroups | org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <[email protected]> |
The ruff lint tool reported loop control variables that were
not being used:
B007 Loop control variable `dirs` not used within loop body
Replace dirs with an underscore to indicate that the value
is being discarded.
Signed-off-by: Rob Woolley <[email protected]>
---
bin/bitbake-setup | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 2829e753..508d141f 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -134,7 +134,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, _, 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")
@@ -449,7 +449,7 @@ The bitbake configuration files (local.conf, bblayers.conf and more) can be foun
configure_vscode(setupdir, layerdir, bitbake_builddir, init_script)
def get_registry_config(registry_path, id):
- for root, dirs, files in os.walk(registry_path):
+ for root, _, 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)
@@ -1000,7 +1000,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, _, files in os.walk(registry_path):
for f in files:
if f.endswith('.conf.json'):
config_name = get_config_name(f)
--
2.49.0