File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 3232
3333DEFAULT_LOCATIONS_TO_IGNORE = {
3434 re .compile (r"^/(code|models|sourcedata|stimuli)" ),
35- re .compile (r'/\.' ),
3635}
3736
37+ ALWAYS_IGNORE = (
38+ re .compile (r'/\.' ), # dotfiles should never be indexed
39+ )
40+
3841def absolute_path_deprecation_warning ():
3942 warnings .warn ("The absolute_paths argument will be removed from PyBIDS "
4043 "in 0.14. You can easily access the relative path of "
@@ -156,9 +159,11 @@ def _sort_patterns(patterns, root):
156159
157160def validate_indexing_args (ignore , force_index , root ):
158161 if ignore is None :
159- ignore = list (
160- DEFAULT_LOCATIONS_TO_IGNORE - set (force_index or [])
161- )
162+ ignore = DEFAULT_LOCATIONS_TO_IGNORE - set (force_index or [])
163+
164+ ignore = list (ignore )
165+
166+ ignore .extend (ALWAYS_IGNORE )
162167
163168 # root has already been validated to be a directory
164169 ignore = _sort_patterns (ignore , root )
You can’t perform that action at this time.
0 commit comments