From 5a288649e8fcb999c11cca17ad0c1956f3ef8e11 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 24 Sep 2021 09:20:23 -0400 Subject: Use more f-strings --- python/basicblock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/basicblock.py') diff --git a/python/basicblock.py b/python/basicblock.py index 872e44b8..3854ffd5 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -64,9 +64,9 @@ class BasicBlock: def __repr__(self): arch = self.arch if arch: - return "" % (arch.name, self.start, self.end) + return f"" else: - return "" % (self.start, self.end) + return f"" def __len__(self): return int(core.BNGetBasicBlockLength(self.handle)) @@ -88,7 +88,7 @@ class BasicBlock: try: object.__setattr__(self, name, value) except AttributeError: - raise AttributeError("attribute '%s' is read only" % name) + raise AttributeError(f"attribute '{name}' is read only") def __iter__(self) -> Generator[Tuple[List['_function.InstructionTextToken'], int], None, None]: if self.arch is None: -- cgit v1.3.1