Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable printing config #91

Closed
adasium opened this issue Oct 18, 2023 · 2 comments · Fixed by #93
Closed

Option to disable printing config #91

adasium opened this issue Oct 18, 2023 · 2 comments · Fixed by #93

Comments

@adasium
Copy link

adasium commented Oct 18, 2023

pre-commit checks every file separately, so the config object is printed multiple times polluting stdout.
It feels like it should only be printed for debugging purposes (e.g. with --debug option enabled).

if len(finalConfig) > 0:
print(f'Found options defined in {tomlFilename}:')
print(finalConfig)
else:
print(f'No config found in {tomlFilename}.')

@jsh9
Copy link
Owner

jsh9 commented Oct 20, 2023

Hi @adasium , thanks for opening up this issue!

This is because pre-commit by default runs files in small batches in parallel. Each batch prints out a stdout statement.

I fixed it by tweaking the pre-commit hook config.

@jsh9 jsh9 closed this as completed in #93 Oct 20, 2023
@jsh9
Copy link
Owner

jsh9 commented Oct 20, 2023

The fix was published as v0.3.7.

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 a pull request may close this issue.

2 participants