diff mbox series

[v2,02/10] rteval: Use f-strings in rtevalConfig

Message ID 20230601202734.813515-3-ashelat@redhat.com
State Superseded
Headers show
Series Cover Letter | expand

Commit Message

Anubhav Shelat June 1, 2023, 8:27 p.m. UTC
Use f-strings in rtevalConfig.py

Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
 rteval/rtevalConfig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Kacur June 5, 2023, 7:31 p.m. UTC | #1
On Thu, 1 Jun 2023, Anubhav Shelat wrote:

> Use f-strings in rtevalConfig.py
> 
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
>  rteval/rtevalConfig.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rteval/rtevalConfig.py b/rteval/rtevalConfig.py
> index de88924642ca..41f1a567720f 100644
> --- a/rteval/rtevalConfig.py
> +++ b/rteval/rtevalConfig.py
> @@ -115,7 +115,7 @@ class rtevalCfgSection:
>          "Simple method for dumping config when object is used as a string"
>          if not self.__cfgdata:
>              return "# empty"
> -        return "\n".join(["%s: %s" % (k, v) for k, v in list(self.__cfgdata.items())]) + "\n"
> +        return "\n".join([f"{k}: {v}" for k, v in list(self.__cfgdata.items())]) + "\n"
>  
>  
>      def __setattr__(self, key, val):
> -- 

Signed-off-by: John Kacur <jkacur@redhat.com>
diff mbox series

Patch

diff --git a/rteval/rtevalConfig.py b/rteval/rtevalConfig.py
index de88924642ca..41f1a567720f 100644
--- a/rteval/rtevalConfig.py
+++ b/rteval/rtevalConfig.py
@@ -115,7 +115,7 @@  class rtevalCfgSection:
         "Simple method for dumping config when object is used as a string"
         if not self.__cfgdata:
             return "# empty"
-        return "\n".join(["%s: %s" % (k, v) for k, v in list(self.__cfgdata.items())]) + "\n"
+        return "\n".join([f"{k}: {v}" for k, v in list(self.__cfgdata.items())]) + "\n"
 
 
     def __setattr__(self, key, val):