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 psf#1880
  • Loading branch information
Shivansh-007 committed Oct 7, 2021
1 parent 3b2a7d1 commit b9b9cb8
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 b9b9cb8

Please sign in to comment.