From ab9baf0d65dedb87a853f87afc63d40276e10b3b Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 29 May 2021 09:03:08 -0700 Subject: [PATCH] Fix path_empty() (#2275) Behavior other than output shouldn't depend on the verbose/quiet option. As far as I can tell this currently has no visible effect, since code after this function is called handles an empty list gracefully. --- src/black/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/black/__init__.py b/src/black/__init__.py index 90aad22..d83f0e5 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -506,8 +506,9 @@ def path_empty( """ Exit if there is no `src` provided for formatting """ - if not src and (verbose or not quiet): - out(msg) + if not src: + if verbose or not quiet: + out(msg) ctx.exit(0) -- 2.39.5