Skip to content

Commit 289abed

Browse files
authored
Merge pull request #1515 from NeuralEnsemble/black-formatting
Black formatting
2 parents 7856ad1 + 152a647 commit 289abed

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
@@ -270,21 +270,21 @@ def get_rawio(filename_or_dirname, exclusive_rawio: bool = True):
270270
Parameters
271271
----------
272272
filename_or_dirname : str | Path
273-
The filename or directory name to check for file suffixes that
274-
can be read by Neo. This can also be used to check whether a
273+
The filename or directory name to check for file suffixes that
274+
can be read by Neo. This can also be used to check whether a
275275
rawio could read a not-yet written file
276276
exclusive_rawio: bool, default: True
277277
Whether to return a rawio if there is only one rawio capable of
278278
reading the file. If this doesn't exist will return None.
279279
If set to False it will return all possible rawios organized
280280
by the most likely rawio.
281-
281+
282282
Returns
283283
-------
284284
possibles: neo.RawIO | None | list[neo.RawIO]
285-
If exclusive_rawio is True, returns the single RawIO that
285+
If exclusive_rawio is True, returns the single RawIO that
286286
can read a file/set of files or None. If exclusive_rawio is
287-
False it will return all possible RawIOs (organized by most likely)
287+
False it will return all possible RawIOs (organized by most likely)
288288
that could read the file or files.
289289
"""
290290
filename_or_dirname = Path(filename_or_dirname)
@@ -295,8 +295,8 @@ def get_rawio(filename_or_dirname, exclusive_rawio: bool = True):
295295
ext = Path(filename_or_dirname).suffix
296296
ext_list = [ext[1:]]
297297
else:
298-
ext_list = list({filename.suffix[1:] for filename in filename_or_dirname.glob('*') if filename.is_file()})
299-
298+
ext_list = list({filename.suffix[1:] for filename in filename_or_dirname.glob("*") if filename.is_file()})
299+
300300
possibles = []
301301
for ext in ext_list:
302302
for rawio in rawiolist:
@@ -310,4 +310,3 @@ def get_rawio(filename_or_dirname, exclusive_rawio: bool = True):
310310
else:
311311
possibles = [io[0] for io in Counter(possibles).most_common()]
312312
return possibles
313-

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)