black icon indicating copy to clipboard operation
black copied to clipboard

Fix 4227: Black does not print errors with --quiet --check

Open dankrzeminski32 opened this issue 1 year ago • 4 comments

Description

This closes #4227

black was previously not printing any information when called with the --quiet and --check flags.

the related issue makes a valid point that black should stay quiet on successful runs and notify the user when changes are found.

I've omitted part of the output in an attempt to keep the output still quiet, but I can add it in if desired.

For example, when called without the --quiet flag:

would reformat ../test_black/test.py

Oh no! 💥 💔 💥
1 file would be reformatted.

When called with the --quiet flag:


Oh no! 💥 💔 💥
1 file would be reformatted.

Checklist - did you ...

  • [ ] Add an entry in CHANGES.md if necessary?
  • [x] Add / update tests if necessary?
  • [ ] Add new / update outdated documentation?

dankrzeminski32 avatar Feb 15 '24 18:02 dankrzeminski32

Thanks, but I think we don't need to change anything here (except perhaps the docs); see the issue.

JelleZijlstra avatar Feb 15 '24 18:02 JelleZijlstra

@JelleZijlstra Sounds good, I can make a small doc adjustment in this PR or create a new PR if desired.

dankrzeminski32 avatar Feb 15 '24 18:02 dankrzeminski32

diff-shades reports zero changes comparing this PR (2ac51f421eabecb7c2413d98b9f43d0d29554c85) to main (d1d4fc58d3b744db35ac832cddf1d076ba5f5e7f).


What is this? | Workflow run | diff-shades documentation

github-actions[bot] avatar Feb 15 '24 18:02 github-actions[bot]

Either works!

JelleZijlstra avatar Feb 15 '24 18:02 JelleZijlstra