Skip to content

Commit

Permalink
--verbose mode prints location of project root
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Shivansh-007 committed Oct 7, 2021
1 parent 0fd353f commit 304fe58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/black/__init__.py
Expand Up @@ -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)

Expand Down

0 comments on commit 304fe58

Please sign in to comment.