Skip to content

Commit e9ff1be

Browse files
committed
Simplify NO_COLOR check
1 parent 8520455 commit e9ff1be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre_commit/color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def use_color(setting):
4848
if setting not in COLOR_CHOICES:
4949
raise InvalidColorSetting(setting)
5050

51-
if 'NO_COLOR' in os.environ and os.environ['NO_COLOR']:
51+
if os.environ.get('NO_COLOR'):
5252
return False
5353

5454
return (

0 commit comments

Comments
 (0)