[clang] [clang][Python] Use fstrings instead of string concatenations (PR #173861)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 29 07:55:38 PST 2025


================
@@ -3187,13 +3175,10 @@ def briefComment(self) -> str:
 
     def __repr__(self) -> str:
         return (
-            " | ".join([str(a) for a in self])
-            + " || Priority: "
-            + str(self.priority)
-            + " || Availability: "
-            + str(self.availability)
-            + " || Brief comment: "
-            + str(self.briefComment)
+            f"{' | '.join(str(a) for a in self)}"
----------------
Endilll wrote:

This particular part looks like f-string for the sake of f-string

https://github.com/llvm/llvm-project/pull/173861


More information about the cfe-commits mailing list