* [PATCH] meta/classes-recipe/dracut-module: drop redundant bb import in python function
@ 2026-01-06 7:09 srinuvasan.a via isar-users
2026-01-07 12:02 ` 'MOESSBAUER, Felix' via isar-users
2026-01-08 7:49 ` Anton Mikanovich
0 siblings, 2 replies; 3+ messages in thread
From: srinuvasan.a via isar-users @ 2026-01-06 7:09 UTC (permalink / raw)
To: isar-users; +Cc: Srinuvasan A
From: Srinuvasan A <srinuvasan.a@siemens.com>
The BitBake `bb` module is implicitly available in Python functions,
so the explicit import in `replace_marker_with_file_content()` is
unnecessary. Remove the redundant import to align with BitBake
Python function style guidelines.
Ref: https://docs.yoctoproject.org/bitbake/singleindex.html#bitbake-style-python-functions
Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
---
meta/classes-recipe/dracut-module.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-recipe/dracut-module.bbclass b/meta/classes-recipe/dracut-module.bbclass
index e2ed52ac..77521309 100644
--- a/meta/classes-recipe/dracut-module.bbclass
+++ b/meta/classes-recipe/dracut-module.bbclass
@@ -37,7 +37,7 @@ def add_file_if_variable_is_set(d, variable_name, prefix):
return ''
def replace_marker_with_file_content(template_file, content_file, marker):
- import re, bb
+ import re
tmpl = open(template_file).read()
content = open(content_file).read().rstrip('\n')
--
2.34.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260106070939.50797-1-srinuvasan.a%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] meta/classes-recipe/dracut-module: drop redundant bb import in python function
2026-01-06 7:09 [PATCH] meta/classes-recipe/dracut-module: drop redundant bb import in python function srinuvasan.a via isar-users
@ 2026-01-07 12:02 ` 'MOESSBAUER, Felix' via isar-users
2026-01-08 7:49 ` Anton Mikanovich
1 sibling, 0 replies; 3+ messages in thread
From: 'MOESSBAUER, Felix' via isar-users @ 2026-01-07 12:02 UTC (permalink / raw)
To: isar-users, Arjunan, Srinu
On Tue, 2026-01-06 at 12:39 +0530, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
>
> The BitBake `bb` module is implicitly available in Python functions,
> so the explicit import in `replace_marker_with_file_content()` is
> unnecessary. Remove the redundant import to align with BitBake
> Python function style guidelines.
We need a linter to automatically find these cases :)
Reviewed-by: Felix Moessbauer <felix.moessbauer@siemens.com>
>
> Ref: https://docs.yoctoproject.org/bitbake/singleindex.html#bitbake-style-python-functions
>
> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
> meta/classes-recipe/dracut-module.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/dracut-module.bbclass b/meta/classes-recipe/dracut-module.bbclass
> index e2ed52ac..77521309 100644
> --- a/meta/classes-recipe/dracut-module.bbclass
> +++ b/meta/classes-recipe/dracut-module.bbclass
> @@ -37,7 +37,7 @@ def add_file_if_variable_is_set(d, variable_name, prefix):
> return ''
>
> def replace_marker_with_file_content(template_file, content_file, marker):
> - import re, bb
> + import re
>
> tmpl = open(template_file).read()
> content = open(content_file).read().rstrip('\n')
> --
> 2.34.1
>
> --
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260106070939.50797-1-srinuvasan.a%40siemens.com.
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/5f54c98804cce0ead9f176fa32ec825fefda0ad4.camel%40siemens.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] meta/classes-recipe/dracut-module: drop redundant bb import in python function
2026-01-06 7:09 [PATCH] meta/classes-recipe/dracut-module: drop redundant bb import in python function srinuvasan.a via isar-users
2026-01-07 12:02 ` 'MOESSBAUER, Felix' via isar-users
@ 2026-01-08 7:49 ` Anton Mikanovich
1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2026-01-08 7:49 UTC (permalink / raw)
To: srinuvasan.a, isar-users
06/01/2026 09:09, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
>
> The BitBake `bb` module is implicitly available in Python functions,
> so the explicit import in `replace_marker_with_file_content()` is
> unnecessary. Remove the redundant import to align with BitBake
> Python function style guidelines.
>
> Ref: https://docs.yoctoproject.org/bitbake/singleindex.html#bitbake-style-python-functions
>
> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
Applied to next, thanks.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/9a450d3f-0499-4e37-b003-2cee2c9795d5%40ilbers.de.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-08 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-06 7:09 [PATCH] meta/classes-recipe/dracut-module: drop redundant bb import in python function srinuvasan.a via isar-users
2026-01-07 12:02 ` 'MOESSBAUER, Felix' via isar-users
2026-01-08 7:49 ` Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox