Skip to content

Commit

Permalink
--code is special and shouldn't be touched
Browse files Browse the repository at this point in the history
  • Loading branch information
ichard26 committed Dec 25, 2021
1 parent c0cf2f0 commit 6c98632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/black/__init__.py
Expand Up @@ -495,7 +495,8 @@ def main(
)

if verbose or not quiet:
out()
if code is None:
out()
out(error_msg if report.return_code else "All done! ✨ 🍰 ✨")
if code is None:
click.echo(str(report), err=True)
Expand Down
4 changes: 1 addition & 3 deletions src/black/report.py
Expand Up @@ -99,9 +99,7 @@ def __str__(self) -> str:

if self.same_count:
s = "s" if self.same_count > 1 else ""
report.append(
style(f"{self.same_count} file{s} ", fg="blue") + f"{unchanged}"
)
report.append(style(f"{self.same_count} file{s} ", fg="blue") + unchanged)
if self.failure_count:
s = "s" if self.failure_count > 1 else ""
report.append(style(f"{self.failure_count} file{s} {failed}", fg="red"))
Expand Down

0 comments on commit 6c98632

Please sign in to comment.