[clang] [clang][Python] Use fstrings instead of string concatenations (PR #173861)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 29 12:46:43 PST 2025
================
@@ -3060,15 +3048,15 @@ def __str__(self) -> str:
return self.name
def __repr__(self) -> str:
- return "<ChunkKind: %s>" % self
+ return f"<ChunkKind: {self}>"
def __init__(self, completionString: CObjP, key: int):
self.cs = completionString
self.key = key
self.__kindNumberCache = -1
def __repr__(self) -> str:
- return "{'" + self.spelling + "', " + str(self.kind) + "}"
+ return f"{{'{self.spelling}', {self.kind}}}"
----------------
mikomikotaishi wrote:
These are for escaping the curly brace character.
https://github.com/llvm/llvm-project/pull/173861
More information about the cfe-commits
mailing list