summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-09-27 15:37:49 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-28 13:24:41 -0400
commita7b05bff9ca19b783207e1e3935ad82585a59e8b (patch)
treeaaf1956e4056f2d081782d16c87e2a0d81e138bb /python
parented6e4dd83fb600a5391c2ed9280417ecd149ed34 (diff)
More f-strings
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py2
-rw-r--r--python/lowlevelil.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 28db7271..912edd8f 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -7500,7 +7500,7 @@ class StructuredDataValue(object):
return ' '.join([f"{x:02x}" for x in struct.unpack(decode_str, self.value)])
def __repr__(self):
- return "<StructuredDataValue type:{} value:{}>".format(str(self.type), str(self))
+ return f"<StructuredDataValue type:{self.type} value:{self}>"
def __int__(self):
if self.type.width == 1:
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index fb4f65b4..cad8828c 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -4636,9 +4636,9 @@ class LowLevelILBasicBlock(basicblock.BasicBlock):
def __repr__(self):
arch = self.arch
if arch:
- return "<llil block: %s@%d-%d>" % (arch.name, self.start, self.end)
+ return f"<llil block: {arch.name}@{self.start}-{self.end}>"
else:
- return "<llil block: %d-%d>" % (self.start, self.end)
+ return f"<llil block: {self.start}-{self.end}>"
def __hash__(self):
return hash((self.start, self.end, self._il_function))