]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Added decent coloring (#2712)
authorVanSHOE <75690289+VanSHOE@users.noreply.github.com>
Fri, 14 Jan 2022 02:31:08 +0000 (08:01 +0530)
committerGitHub <noreply@github.com>
Fri, 14 Jan 2022 02:31:08 +0000 (18:31 -0800)
CHANGES.md
src/black/__init__.py
src/black/report.py

index 5a8a0ef9f7c4bb8caee688929b40e1ec5c09c695..6813e86e0da64125bac75a5429a97382f6248691 100644 (file)
@@ -20,6 +20,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)
 - 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)
 - For stubs, one blank line between class attributes and methods is now kept if there's
   at least one pre-existing blank line (#2736)
 - Verbose mode also now describes how a project root was discovered and which paths will
 - For stubs, one blank line between class attributes and methods is now kept if there's
   at least one pre-existing blank line (#2736)
 - Verbose mode also now describes how a project root was discovered and which paths will
index cfa2c7663fe6a4b2291341486b8717be15a65b5b..fa918ce293172239fb87db2e0bfb600e836494d0 100644 (file)
@@ -526,6 +526,8 @@ def main(
             )
 
     if verbose or not quiet:
             )
 
     if verbose or not quiet:
+        if code is None and (verbose or report.change_count or report.failure_count):
+            out()
         out(error_msg if report.return_code else "All done! ✨ 🍰 ✨")
         if code is None:
             click.echo(str(report), err=True)
         out(error_msg if report.return_code else "All done! ✨ 🍰 ✨")
         if code is None:
             click.echo(str(report), err=True)
index 7e1c8b4b87f273bf6b99868fcdc641afadb8c4d6..43b942c9e3c809f57796f9c37da9921fffcf728b 100644 (file)
@@ -93,11 +93,13 @@ class Report:
         if self.change_count:
             s = "s" if self.change_count > 1 else ""
             report.append(
         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 ""
         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") + 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"))
         if self.failure_count:
             s = "s" if self.failure_count > 1 else ""
             report.append(style(f"{self.failure_count} file{s} {failed}", fg="red"))