From c543f00bd3c737f73144bb2980d12793042459b4 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 11 May 2021 14:30:46 -0700 Subject: [PATCH] simplify piped_output function --- jc/cli.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jc/cli.py b/jc/cli.py index 553b8baa..77ad380f 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -227,10 +227,7 @@ def set_env_colors(env_colors=None): def piped_output(): """Return False if stdout is a TTY. True if output is being piped to another program""" - if sys.stdout.isatty(): - return False - else: - return True + return False if sys.stdout.isatty() else True def ctrlc(signum, frame):