public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "srinuvasan.a via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: cedric.hombourger@siemens.com, ubely@ilbers.de,
	srinuvasan <srinuvasan.a@siemens.com>
Subject: [PATCH] meta/recipes-devtools/sbuild-chroot: Use modern python formatting
Date: Tue, 14 Jan 2025 16:30:19 +0530	[thread overview]
Message-ID: <20250114110019.189529-1-srinuvasan.a@siemens.com> (raw)

From: srinuvasan <srinuvasan.a@siemens.com>

f-strings are faster and better than str.format(), and Moreover
f-strings provide a concise and convenient way to embed Python expressions
inside string literals for formatting, hence use f-strings rather than str.format().

Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
 .../recipes-devtools/sbuild-chroot/sbuild-chroot.inc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
index d794c6fd..6478d3a6 100644
--- a/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
+++ b/meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc
@@ -23,21 +23,21 @@ python() {
 
     if d.getVar('DISTRO_GCC'):
         d.appendVar('SBUILD_CHROOT_PREINSTALL_COMMON',
-                    ' libgcc-{}-dev:{}'.format(distro_gcc, distro_arch))
+                    f" libgcc-{distro_gcc}-dev:{distro_arch}")
         d.appendVar('SBUILD_CHROOT_PREINSTALL_COMMON',
-                    ' libstdc++-{}-dev:{}'.format(distro_gcc, distro_arch))
+                    f" libstdc++-{distro_gcc}-dev:{distro_arch}")
 
     if bb.utils.to_boolean(d.getVar('ISAR_ENABLE_COMPAT_ARCH')):
         compat_arch = d.getVar('COMPAT_DISTRO_ARCH')
         d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
-                    ' libc6-dev:{}'.format(compat_arch))
+                    f" libc6-dev:{compat_arch}")
         d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
-                    ' crossbuild-essential-{}'.format(compat_arch))
+                    f" crossbuild-essential-{compat_arch}")
         if d.getVar('DISTRO_GCC'):
             d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
-                        ' libgcc-{}-dev:{}'.format(distro_gcc, compat_arch))
+                        f" libgcc-{distro_gcc}-dev:{compat_arch}")
             d.appendVar('SBUILD_CHROOT_COMPAT_PREINSTALL',
-                        ' libstdc++-{}-dev:{}'.format(distro_gcc, compat_arch))
+                        f" libstdc++-{distro_gcc}-dev:{compat_arch}")
 }
 
 SBUILD_CHROOT_PREINSTALL_COMMON = " \
-- 
2.39.5

-- 
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/20250114110019.189529-1-srinuvasan.a%40siemens.com.

             reply	other threads:[~2025-01-14 11:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 11:00 srinuvasan.a via isar-users [this message]
2025-01-21 13:58 ` Uladzimir Bely

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=20250114110019.189529-1-srinuvasan.a@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=srinuvasan.a@siemens.com \
    --cc=ubely@ilbers.de \
    /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