From 8d80d51cadac3bfcbed9cd3475c1cbb480ded3a5 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Fri, 15 Jan 2016 07:41:58 -0800 Subject: [PATCH] Fix coverage on check_symlinks for windows --- pre_commit_hooks/check_symlinks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pre_commit_hooks/check_symlinks.py b/pre_commit_hooks/check_symlinks.py index d0f0f09..3fcaecc 100644 --- a/pre_commit_hooks/check_symlinks.py +++ b/pre_commit_hooks/check_symlinks.py @@ -15,7 +15,10 @@ def check_symlinks(argv=None): retv = 0 for filename in args.filenames: - if os.path.islink(filename) and not os.path.exists(filename): + if ( + os.path.islink(filename) and + not os.path.exists(filename) + ): # pragma no cover (symlink support required) print('{0}: Broken symlink'.format(filename)) retv = 1