File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def wrapper(include_expr, exclude_expr):
8989 if (
9090 include_regex .search (filename ) and
9191 not exclude_regex .search (filename ) and
92- os .path .exists (filename )
92+ os .path .lexists (filename )
9393 )
9494 )
9595 return wrapper
Original file line number Diff line number Diff line change 1+ does_not_exist
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def get_filenames():
6161 'pre_commit/main.py' ,
6262 'pre_commit/git.py' ,
6363 'im_a_file_that_doesnt_exist.py' ,
64+ 'testing/test_symlink' ,
6465 'hooks.yaml' ,
6566 )
6667
@@ -73,6 +74,7 @@ def test_get_files_matching_base(get_files_matching_func):
7374 'pre_commit/main.py' ,
7475 'pre_commit/git.py' ,
7576 'hooks.yaml' ,
77+ 'testing/test_symlink'
7678 ])
7779
7880
@@ -96,7 +98,7 @@ def test_does_not_include_deleted_fileS(get_files_matching_func):
9698
9799def test_exclude_removes_files (get_files_matching_func ):
98100 ret = get_files_matching_func ('' , '\\ .py$' )
99- assert ret == set (['hooks.yaml' ])
101+ assert ret == set (['hooks.yaml' , 'testing/test_symlink' ])
100102
101103
102104def resolve_conflict ():
You can’t perform that action at this time.
0 commit comments