Skip to content

Commit

Permalink
Merge 0b46a49 into ced2d65
Browse files Browse the repository at this point in the history
  • Loading branch information
VanSHOE committed Dec 25, 2021
2 parents ced2d65 + 0b46a49 commit bd0fa2f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Tuple unpacking on `return` and `yield` constructs now implies 3.8+ (#2700)
- Unparenthesized tuples on annotated assignments (e.g
`values: Tuple[int, ...] = 1, 2, 3`) now implies 3.8+ (#2708)
- Text coloring added in the final statistics (#2712)

## 21.12b0

Expand Down
2 changes: 2 additions & 0 deletions src/black/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ def main(
)

if verbose or not quiet:
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
8 changes: 6 additions & 2 deletions src/black/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ def __str__(self) -> str:
if self.change_count:
s = "s" if self.change_count > 1 else ""
report.append(
style(f"{self.change_count} file{s} {reformatted}", bold=True)
style(f"{self.change_count} file{s} ", bold=True, fg="blue")
+ style(f"{reformatted}", bold=True)
)

if self.same_count:
s = "s" if self.same_count > 1 else ""
report.append(f"{self.same_count} file{s} {unchanged}")
report.append(
style(f"{self.same_count} file{s} ", fg="blue") + f"{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 bd0fa2f

Please sign in to comment.