From a18b683d12feb95a966c46ca0e8a78ef62e89f80 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 18 Mar 2019 02:31:47 +0100 Subject: [PATCH] Add review suggestion Co-Authored-By: DanielChabrowski --- pre_commit/commands/try_repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit/commands/try_repo.py b/pre_commit/commands/try_repo.py index 4bffd754..e55739e0 100644 --- a/pre_commit/commands/try_repo.py +++ b/pre_commit/commands/try_repo.py @@ -38,7 +38,7 @@ def _repo_ref(tmpdir, repo, ref): env = dict(os.environ, GIT_INDEX_FILE=idx, GIT_OBJECT_DIRECTORY=objs) staged_files = git.get_staged_files(cwd=repo) - if (len(staged_files) > 0): + if staged_files: cmd_output('git', 'add', *staged_files, cwd=repo, env=env) cmd_output('git', 'add', '-u', cwd=repo, env=env)