X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/1f7f6de4aba4e1e42cb2f947204f8256f7370cb0..18fb88486d434dbde9b2a9c98f008a71cf5d941d:/src/black/__init__.py diff --git a/src/black/__init__.py b/src/black/__init__.py index 39d1296..5d35c80 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -478,16 +478,20 @@ def main( # noqa: C901 ) normalized = [ - (source, source) - if source == "-" - else (normalize_path_maybe_ignore(Path(source), root), source) + ( + (source, source) + if source == "-" + else (normalize_path_maybe_ignore(Path(source), root), source) + ) for source in src ] srcs_string = ", ".join( [ - f'"{_norm}"' - if _norm - else f'\033[31m"{source} (skipping - invalid)"\033[34m' + ( + f'"{_norm}"' + if _norm + else f'\033[31m"{source} (skipping - invalid)"\033[34m' + ) for _norm, source in normalized ] ) @@ -511,6 +515,9 @@ def main( # noqa: C901 out("Using configuration from project root.", fg="blue") else: out(f"Using configuration in '{config}'.", fg="blue") + if ctx.default_map: + for param, value in ctx.default_map.items(): + out(f"{param}: {value}") error_msg = "Oh no! 💥 💔 💥" if ( @@ -666,10 +673,11 @@ def get_sources( sources.add(p) elif p.is_dir(): + p = root / normalize_path_maybe_ignore(p, ctx.obj["root"], report) if using_default_exclude: gitignore = { root: root_gitignore, - root / p: get_gitignore(p), + p: get_gitignore(p), } sources.update( gen_python_files(