File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -87,13 +87,16 @@ def check_file(
87
87
new_file_name = os .path .join (tempdir , os .path .basename (filename ))
88
88
with open (new_file_name , "w+" ) as new_file :
89
89
# default to match everything if there is nothing in the ALLOW_LIST
90
- allow_list_pattern = ALLOW_LIST .get (filename , MATCH_ANY )
90
+ allow_list_pattern = ALLOW_LIST .get (filename , None )
91
91
with open (filename ) as f :
92
92
for line in f :
93
93
keep_line = True
94
94
keep_line = not RELEASE_PATTERN .search (line )
95
95
keep_line |= global_allow_pattern .search (line ) is not None
96
- keep_line |= allow_list_pattern .search (line ) is not None
96
+ keep_line |= (
97
+ allow_list_pattern is not None
98
+ and allow_list_pattern .search (line ) is not None
99
+ )
97
100
98
101
if keep_line :
99
102
new_file .write (line )
You can’t perform that action at this time.
0 commit comments