From b9b9cb8f8d442118664c062446dabab7f257c635 Mon Sep 17 00:00:00 2001 From: Shivansh-007 Date: Sat, 2 Oct 2021 14:48:29 +0530 Subject: [PATCH] `--verbose` mode prints location of project root Black would now echo the location that it determined as the root path for the project if `--verbose` is enabled by the user, according to which it chooses the SRC paths, i.e. the absolute path of the project is `{root}/{src}`. Closes #1880 --- src/black/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/black/__init__.py b/src/black/__init__.py index 83a39234d38..818005ec7fb 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -505,6 +505,9 @@ def get_sources( """Compute the set of files to be formatted.""" root = find_project_root(src) + if verbose: + out(f"Checking for `{'`, `'.join(src)}` in {root}", fg="blue", bold=False) + sources: Set[Path] = set() path_empty(src, "No Path provided. Nothing to do 😴", quiet, verbose, ctx)