mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Some manual .format() -> f-strings
This commit is contained in:
parent
aefbe71765
commit
9000e9dd41
27 changed files with 133 additions and 173 deletions
|
|
@ -54,12 +54,9 @@ def get_hook_message(
|
|||
assert end_msg is not None
|
||||
assert end_color is not None
|
||||
assert use_color is not None
|
||||
return '{}{}{}{}\n'.format(
|
||||
start,
|
||||
'.' * (cols - len(start) - len(postfix) - len(end_msg) - 1),
|
||||
postfix,
|
||||
color.format_color(end_msg, end_color, use_color),
|
||||
)
|
||||
dots = '.' * (cols - len(start) - len(postfix) - len(end_msg) - 1)
|
||||
end = color.format_color(end_msg, end_color, use_color)
|
||||
return f'{start}{dots}{postfix}{end}\n'
|
||||
|
||||
|
||||
def write(s: str, stream: IO[bytes] = sys.stdout.buffer) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue