diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-09-24 09:20:23 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-24 09:40:16 -0400 |
| commit | 5a288649e8fcb999c11cca17ad0c1956f3ef8e11 (patch) | |
| tree | 7d9df04c7ffaa25d6192cfd09f3e48c2b06054a7 /python/binaryview.py | |
| parent | ad16e8b3d27e30cc4eefb7c673f7646a30fe2f26 (diff) | |
Use more f-strings
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 28634f83..28db7271 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -383,7 +383,7 @@ class AnalysisProgress: return "Extended Analysis" def __repr__(self): - return "<progress: %s>" % str(self) + return f"<progress: {self}>" class BinaryDataNotificationCallbacks: @@ -636,7 +636,7 @@ class _BinaryViewTypeMetaclass(type): binaryninja._init_plugins() view_type = core.BNGetBinaryViewTypeByName(str(value)) if view_type is None: - raise KeyError("'%s' is not a valid view type" % str(value)) + raise KeyError(f"'{value}' is not a valid view type") return BinaryViewType(view_type) @@ -7844,4 +7844,4 @@ class DataVariableAndName(CoreDataVariable): self.name = var_name def __repr__(self) -> str: - return "<var 0x%x: %s %s>" % (self.address, str(self.type), self.name)
\ No newline at end of file + return f"<var {self.address:#x}: {self.type} {self.name}>"
\ No newline at end of file |
