diff options
| author | 2018-12-03 16:49:33 +1100 | |
|---|---|---|
| committer | 2018-12-03 16:49:33 +1100 | |
| commit | c968f22f7dda90dc9c4256effc30de99fc7f58a4 (patch) | |
| tree | 93dcf4a15f7107dd3b8eb9794173fc2d77c98c08 | |
| parent | Add commas to server command (#209) (diff) | |
Makes generating `...:` indents faster
Uses `rjust` instead of an fstring:
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/eval.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/eval.py b/bot/cogs/eval.py index 651aa048b..9e09b3aa0 100644 --- a/bot/cogs/eval.py +++ b/bot/cogs/eval.py @@ -66,9 +66,9 @@ class CodeEval: # far enough to align them. # we first `str()` the line number # then we get the length - # and do a simple {:<LENGTH} + # and use `str.rjust()` # to indent it. - start = f"{'':<{len(str(self.ln))+2}}...: " + start = "...:".rjust(len(self.ln) + 2) if i == len(lines) - 2: if line.startswith("return"): |