Skip to content

Commit 3951020

Browse files
authored
Merge branch 'master' into neuronexus
2 parents 7b91ac2 + 289abed commit 3951020

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

neo/io/neuralynxio.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ def __init__(
7070
"""
7171

7272
if filename is not None:
73-
warnings.warn('Deprecated and will be removed. Please use `include_filenames` instead')
73+
warnings.warn("Deprecated and will be removed. Please use `include_filenames` instead")
7474
include_filenames = [filename]
7575

7676
if exclude_filename is not None:
77-
warnings.warn('Deprecated and will be removed. Please use `exclude_filenames` instead')
77+
warnings.warn("Deprecated and will be removed. Please use `exclude_filenames` instead")
7878
exclude_filenames = exclude_filename
7979

8080
NeuralynxRawIO.__init__(
@@ -84,11 +84,10 @@ def __init__(
8484
exclude_filenames=exclude_filenames,
8585
keep_original_times=keep_original_times,
8686
use_cache=use_cache,
87-
cache_path=cache_path
87+
cache_path=cache_path,
8888
)
8989

9090
if self.rawmode == "one-dir":
9191
BaseFromRaw.__init__(self, dirname)
9292
elif self.rawmode == "multiple-files":
9393
BaseFromRaw.__init__(self, include_filenames=include_filenames)
94-

neo/rawio/__init__.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,21 +277,21 @@ def get_rawio(filename_or_dirname, exclusive_rawio: bool = True):
277277
Parameters
278278
----------
279279
filename_or_dirname : str | Path
280-
The filename or directory name to check for file suffixes that
281-
can be read by Neo. This can also be used to check whether a
280+
The filename or directory name to check for file suffixes that
281+
can be read by Neo. This can also be used to check whether a
282282
rawio could read a not-yet written file
283283
exclusive_rawio: bool, default: True
284284
Whether to return a rawio if there is only one rawio capable of
285285
reading the file. If this doesn't exist will return None.
286286
If set to False it will return all possible rawios organized
287287
by the most likely rawio.
288-
288+
289289
Returns
290290
-------
291291
possibles: neo.RawIO | None | list[neo.RawIO]
292-
If exclusive_rawio is True, returns the single RawIO that
292+
If exclusive_rawio is True, returns the single RawIO that
293293
can read a file/set of files or None. If exclusive_rawio is
294-
False it will return all possible RawIOs (organized by most likely)
294+
False it will return all possible RawIOs (organized by most likely)
295295
that could read the file or files.
296296
"""
297297
filename_or_dirname = Path(filename_or_dirname)
@@ -302,8 +302,8 @@ def get_rawio(filename_or_dirname, exclusive_rawio: bool = True):
302302
ext = Path(filename_or_dirname).suffix
303303
ext_list = [ext[1:]]
304304
else:
305-
ext_list = list({filename.suffix[1:] for filename in filename_or_dirname.glob('*') if filename.is_file()})
306-
305+
ext_list = list({filename.suffix[1:] for filename in filename_or_dirname.glob("*") if filename.is_file()})
306+
307307
possibles = []
308308
for ext in ext_list:
309309
for rawio in rawiolist:
@@ -317,4 +317,3 @@ def get_rawio(filename_or_dirname, exclusive_rawio: bool = True):
317317
else:
318318
possibles = [io[0] for io in Counter(possibles).most_common()]
319319
return possibles
320-

neo/rawio/neuralynxrawio/neuralynxrawio.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ class NeuralynxRawIO(BaseRawIO):
135135
]
136136

137137
def __init__(
138-
self,
139-
dirname="",
140-
include_filenames=None,
141-
exclude_filenames=None,
142-
keep_original_times=False,
143-
strict_gap_mode=True,
144-
filename=None,
145-
exclude_filename=None,
146-
**kargs
138+
self,
139+
dirname="",
140+
include_filenames=None,
141+
exclude_filenames=None,
142+
keep_original_times=False,
143+
strict_gap_mode=True,
144+
filename=None,
145+
exclude_filename=None,
146+
**kargs,
147147
):
148148

149149
if not dirname:
@@ -158,7 +158,9 @@ def __init__(
158158
exclude_filenames = [exclude_filename]
159159
else:
160160
exclude_filenames = exclude_filename
161-
warnings.warn("`exclude_filename` is deprecated and will be removed. Please use `exclude_filenames` instead")
161+
warnings.warn(
162+
"`exclude_filename` is deprecated and will be removed. Please use `exclude_filenames` instead"
163+
)
162164

163165
if include_filenames is None:
164166
include_filenames = []
@@ -171,7 +173,7 @@ def __init__(
171173
exclude_filenames = [exclude_filenames]
172174

173175
if include_filenames:
174-
self.rawmode = 'multiple-files'
176+
self.rawmode = "multiple-files"
175177
else:
176178
self.rawmode = "one-dir"
177179

0 commit comments

Comments
 (0)