From 4c804052e0928432bc92635108b1e58ae425ce5f Mon Sep 17 00:00:00 2001 From: helly25 Date: Thu, 25 Apr 2024 09:33:59 +0000 Subject: [PATCH] Make formatting of the new code style compliant. --- pre_commit/commands/run.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py index 44a7aa4c..81b933d5 100644 --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -223,12 +223,12 @@ def _run_single_hook( if retcode: _subtle_line(f'- exit code: {retcode}', use_color) if verbose and hook.description: + description = hook.description if '\n' in hook.description: - _subtle_line('- description: |', use_color) - for l in hook.description.splitlines(): - _subtle_line(' ' + l, use_color) - else: - _subtle_line(f'- description: {hook.description}', use_color) + description = '|' + for line in hook.description.splitlines(): + description += '\n ' + line + _subtle_line(f'- description: {description}', use_color) # Print a message if failing due to file modifications if files_modified: