diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-18 16:54:00 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-18 16:54:00 +0200 |
| commit | c663acc4ed8e7d2a9e4389a3e8f790d60a070a0c (patch) | |
| tree | d37fca42651fad8b0c55984a8796881ce8243777 /algorithms/params.py | |
| parent | add .git-blame-ignore-revs (diff) | |
| download | sorting-algorithms-c663acc4ed8e7d2a9e4389a3e8f790d60a070a0c.tar.gz sorting-algorithms-c663acc4ed8e7d2a9e4389a3e8f790d60a070a0c.zip | |
use format strings
Diffstat (limited to 'algorithms/params.py')
| -rw-r--r-- | algorithms/params.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
