Make formatting of the new code style compliant.

This commit is contained in:
helly25 2024-04-25 09:33:59 +00:00
parent 689f1203f7
commit 4c804052e0
No known key found for this signature in database
GPG key ID: 95B24A6EAE247816

View file

@ -223,12 +223,12 @@ def _run_single_hook(
if retcode: if retcode:
_subtle_line(f'- exit code: {retcode}', use_color) _subtle_line(f'- exit code: {retcode}', use_color)
if verbose and hook.description: if verbose and hook.description:
description = hook.description
if '\n' in hook.description: if '\n' in hook.description:
_subtle_line('- description: |', use_color) description = '|'
for l in hook.description.splitlines(): for line in hook.description.splitlines():
_subtle_line(' ' + l, use_color) description += '\n ' + line
else: _subtle_line(f'- description: {description}', use_color)
_subtle_line(f'- description: {hook.description}', use_color)
# Print a message if failing due to file modifications # Print a message if failing due to file modifications
if files_modified: if files_modified: