@@ -80,25 +80,22 @@ def get_filenames():
8080
8181def test_get_files_matching_base (get_files_matching_func ):
8282 ret = get_files_matching_func ('' , '^$' )
83- assert ret == set ([
83+ assert ret == {
8484 'pre_commit/main.py' ,
8585 'pre_commit/git.py' ,
8686 'hooks.yaml' ,
8787 'testing/test_symlink'
88- ])
88+ }
8989
9090
9191def test_get_files_matching_total_match (get_files_matching_func ):
9292 ret = get_files_matching_func ('^.*\\ .py$' , '^$' )
93- assert ret == set ([
94- 'pre_commit/main.py' ,
95- 'pre_commit/git.py' ,
96- ])
93+ assert ret == {'pre_commit/main.py' , 'pre_commit/git.py' }
9794
9895
9996def test_does_search_instead_of_match (get_files_matching_func ):
10097 ret = get_files_matching_func ('\\ .yaml$' , '^$' )
101- assert ret == set ([ 'hooks.yaml' ])
98+ assert ret == { 'hooks.yaml' }
10299
103100
104101def test_does_not_include_deleted_fileS (get_files_matching_func ):
@@ -108,7 +105,7 @@ def test_does_not_include_deleted_fileS(get_files_matching_func):
108105
109106def test_exclude_removes_files (get_files_matching_func ):
110107 ret = get_files_matching_func ('' , '\\ .py$' )
111- assert ret == set ([ 'hooks.yaml' , 'testing/test_symlink' ])
108+ assert ret == { 'hooks.yaml' , 'testing/test_symlink' }
112109
113110
114111def resolve_conflict ():
@@ -124,12 +121,12 @@ def test_get_conflicted_files(in_merge_conflict):
124121 cmd_output ('git' , 'add' , 'other_file' )
125122
126123 ret = set (git .get_conflicted_files ())
127- assert ret == set (( 'conflict_file' , 'other_file' ))
124+ assert ret == { 'conflict_file' , 'other_file' }
128125
129126
130127def test_get_conflicted_files_in_submodule (in_conflicting_submodule ):
131128 resolve_conflict ()
132- assert set (git .get_conflicted_files ()) == set (( 'conflict_file' ,))
129+ assert set (git .get_conflicted_files ()) == { 'conflict_file' }
133130
134131
135132def test_get_conflicted_files_unstaged_files (in_merge_conflict ):
@@ -142,7 +139,7 @@ def test_get_conflicted_files_unstaged_files(in_merge_conflict):
142139 bar_only_file .write ('new contents!\n ' )
143140
144141 ret = set (git .get_conflicted_files ())
145- assert ret == set (( 'conflict_file' ,))
142+ assert ret == { 'conflict_file' }
146143
147144
148145MERGE_MSG = "Merge branch 'foo' into bar\n \n Conflicts:\n \t conflict_file\n "
0 commit comments