Skip to content

Prek: disable progress - #11

Merged
whoutman merged 5 commits into
mainfrom
prek_no_progress
Aug 14, 2026
Merged

whoutman merged 5 commits into
mainfrom
prek_no_progress

Conversation

@whoutman

Copy link
Copy Markdown
Contributor

No description provided.

@whoutman
whoutman requested a review from Timple August 13, 2026 14:21
Comment thread run-nobleo-hooks Outdated
Comment on lines +21 to +28
option = ''
if runner := shutil.which('prek'):
option = '--no-progress' # prevents manipulated shell output for nested runs
else:
runner = 'pre-commit'

cfg = os.path.join(HERE, 'nobleo-hooks.yaml')
cmd = [runner, 'run', '--config', cfg, '--files'] + args.files
cmd = [runner, 'run', '--config', cfg, option, '--files'] + args.files

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have stayed a one-liner I guess:

Suggested change
option = ''
if runner := shutil.which('prek'):
option = '--no-progress' # prevents manipulated shell output for nested runs
else:
runner = 'pre-commit'
cfg = os.path.join(HERE, 'nobleo-hooks.yaml')
cmd = [runner, 'run', '--config', cfg, '--files'] + args.files
cmd = [runner, 'run', '--config', cfg, option, '--files'] + args.files
runner = f"{r} --no-progress" if (r := shutil.which('prek')) else 'pre-commit'
cfg = os.path.join(HERE, 'nobleo-hooks.yaml')
cmd = [runner, 'run', '--config', cfg, '--files'] + args.files

But this works as well.

@whoutman
whoutman merged commit 53e0603 into main Aug 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants