diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-26 05:30:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-26 05:33:19 +0300 |
commit | 646ef49e197d14e7717547a3f9ed119f5a79e2a8 (patch) | |
tree | 29daa5c9d2cc82dd6c7cd1112449558111d6f5d2 /release/scripts/startup/bl_operators | |
parent | 2db4a81fe4af0a003e545b6834c038eb7b704744 (diff) |
Cleanup: use percentage formatting
`str.format` and `f-string` use was minimal.
Prefer using a single style of string formatting
unless an alternative is more widely adopted.
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r-- | release/scripts/startup/bl_operators/sequencer.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index e0aaea3c085..f8f37953f1c 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -234,7 +234,7 @@ class SequencerFadesAdd(Operator): sequence.invalidate('COMPOSITE') sequence_string = "sequence" if len(faded_sequences) == 1 else "sequences" - self.report({'INFO'}, "Added fade animation to {} {}.".format(len(faded_sequences), sequence_string)) + self.report({'INFO'}, "Added fade animation to %d %s." % (len(faded_sequences), sequence_string)) return {'FINISHED'} def calculate_fade_duration(self, context, sequence): @@ -362,7 +362,7 @@ class Fade: return max_value if max_value > 0.0 else 1.0 def __repr__(self): - return "Fade {}: {} to {}".format(self.type, self.start, self.end) + return "Fade %r: %r to %r" % (self.type, self.start, self.end) def calculate_duration_frames(context, duration_seconds): diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 4c4736cd669..04bd5687364 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1697,7 +1697,7 @@ class WM_OT_tool_set_by_id(Operator): tool_settings.workspace_tool_type = 'FALLBACK' return {'FINISHED'} else: - self.report({'WARNING'}, f"Tool {self.name!r:s} not found for space {space_type!r:s}.") + self.report({'WARNING'}, "Tool %r not found for space %r." % (self.name, space_type)) return {'CANCELLED'} @@ -2216,8 +2216,8 @@ class WM_OT_batch_rename(Operator): elif ty == 'STRIP': chars = action.strip_chars chars_strip = ( - "{:s}{:s}{:s}" - ).format( + "%s%s%s" + ) % ( string.punctuation if 'PUNCT' in chars else "", string.digits if 'DIGIT' in chars else "", " " if 'SPACE' in chars else "", @@ -2282,7 +2282,7 @@ class WM_OT_batch_rename(Operator): split.prop(self, "data_type", text="") split = layout.split(factor=0.5) - split.label(text="Rename {:d} {:s}:".format(len(self._data[0]), self._data[2])) + split.label(text="Rename %d %s:" % (len(self._data[0]), self._data[2])) split.row().prop(self, "data_source", expand=True) for action in self.actions: @@ -2397,7 +2397,7 @@ class WM_OT_batch_rename(Operator): change_len += 1 total_len += 1 - self.report({'INFO'}, "Renamed {:d} of {:d} {:s}".format(change_len, total_len, descr)) + self.report({'INFO'}, "Renamed %d of %d %s" % (change_len, total_len, descr)) return {'FINISHED'} |