From c663acc4ed8e7d2a9e4389a3e8f790d60a070a0c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 18 Jun 2026 16:54:00 +0200 Subject: use format strings --- algorithms/params.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'algorithms/params.py') diff --git a/algorithms/params.py b/algorithms/params.py index 818ca47..fb5af6f 100644 --- a/algorithms/params.py +++ b/algorithms/params.py @@ -24,7 +24,7 @@ class TimeUnits(Enum): return 1000.0 if self is TimeUnits.MICROSECONDS: return 1000000.0 - raise NotImplementedError("invalid time units: " + str(self)) + raise NotImplementedError(f"invalid time units: {self}") def __str__(self): return self.value @@ -109,10 +109,10 @@ class AlgorithmParameters: @staticmethod def _format_plot_ylabel(units): - return "Running time ({})".format(units) + return f"Running time ({units})" def _format_plot_title(self): - return "{}, {} case".format(self.algorithm.display_name, self.input_kind) + return f"{self.algorithm.display_name}, {self.input_kind} case" def _format_plot_suptitle(self): return self.algorithm.display_name -- cgit v1.3