From e9ff1be96c831a1f77708b782dca19fe6d7250da Mon Sep 17 00:00:00 2001 From: Edgar Geier Date: Mon, 22 Jul 2019 20:09:32 +0200 Subject: [PATCH] Simplify NO_COLOR check --- pre_commit/color.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit/color.py b/pre_commit/color.py index 102639ad..2ede410a 100644 --- a/pre_commit/color.py +++ b/pre_commit/color.py @@ -48,7 +48,7 @@ def use_color(setting): if setting not in COLOR_CHOICES: raise InvalidColorSetting(setting) - if 'NO_COLOR' in os.environ and os.environ['NO_COLOR']: + if os.environ.get('NO_COLOR'): return False return (