Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9eadfb9

Browse files
committed
reduces line length
1 parent e3cf097 commit 9eadfb9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pre_commit/util.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ def no_git_env():
7777
# GIT_DIR: Causes git clone to clone wrong thing
7878
# GIT_INDEX_FILE: Causes 'error invalid object ...' during commit
7979

80-
# list of explicitly whitelisted variables
81-
allowed_git_envs = ['GIT_SSH']
8280
return {
83-
k: v for k, v in os.environ.items() if not k.startswith('GIT_') or k in allowed_git_envs
81+
k: v for k, v in os.environ.items()
82+
if not k.startswith('GIT_') or k in {'GIT_SSH'}
8483
}
8584

8685

0 commit comments

Comments
 (0)