No ned to  add ignore and force_index as instance args
@@ -206,8 +206,6 @@ class BIDSLayout(object):
self.sources = sources
self.regex_search = regex_search
self.config_filename = config_filename
- self.ignore = ignore
- self.force_index = force_index
# Store init arguments for saving
self._sanitize_init_args(
root=root, validate=validate, absolute_paths=absolute_paths,
@@ -231,16 +229,16 @@ class BIDSLayout(object):
# Do basic BIDS validation on root directory
self._validate_root()
- if self.ignore is None:
- self.ignore = self._default_ignore
+ if ignore is None:
+ ignore = self._default_ignore
# Instantiate after root validation to ensure os.path.join works
- self.ignore = [os.path.abspath(os.path.join(self.root, patt))
+ ignore = [os.path.abspath(os.path.join(self.root, patt))
if isinstance(patt, str) else patt
- for patt in listify(self.ignore or [])]
- self.force_index = [os.path.abspath(os.path.join(self.root, patt))
+ for patt in listify(ignore or [])]
+ force_index = [os.path.abspath(os.path.join(self.root, patt))
if isinstance(patt, str) else patt
- for patt in listify(self.force_index or [])]
+ for patt in listify(force_index or [])]
# Initialize the BIDS validator and examine ignore/force_index args
self._validate_force_index()
