Skip to content

Commit

Permalink
Fixed linting mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
berndie committed May 31, 2024
1 parent 9f2939b commit 7562f39
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
27 changes: 14 additions & 13 deletions brain_pipe/save/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ def get_relpath(self, path: str):
The relative path.
"""
if (
self.saver is not None
and isinstance(self.saver, DefaultSave)
and os.path.isabs(path)
self.saver is not None
and isinstance(self.saver, DefaultSave)
and os.path.isabs(path)
):
return os.path.relpath(path, self.saver.root_dir)
return path
Expand All @@ -480,11 +480,11 @@ def clear(self):
os.remove(metadata_path)

def get_metadata_for_savepath(
self,
path: str,
feature_name: Optional[str],
set_name: Optional[str],
from_old_format=False,
self,
path: str,
feature_name: Optional[str],
set_name: Optional[str],
from_old_format=False,
):
"""Get the metadata associated for path where data is saved.
Expand Down Expand Up @@ -546,11 +546,11 @@ def get(self):
return metadata

def add(
self,
data_dict: Dict[str, Any],
filepath: str,
feature_name: Optional[str],
set_name: Optional[str],
self,
data_dict: Dict[str, Any],
filepath: str,
feature_name: Optional[str],
set_name: Optional[str],
):
"""Add metadata for a file.
Expand Down Expand Up @@ -621,6 +621,7 @@ def __getitem__(self, key: Any):
with self.lock:
return self.get()[key]


class DefaultSave(Save):
"""Default save class.
Expand Down
8 changes: 6 additions & 2 deletions examples/exporl/sparrKULee.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@
from brain_pipe.save.default import DefaultSave
from brain_pipe.utils.log import default_logging, DefaultFormatter
from brain_pipe.utils.path import BIDSStimulusGrouper
from examples.exporl.utils import temp_stimulus_load_fn, SparrKULeeSpectrogramKwargs, \
BIDSAPRStimulusInfoExtractor, bids_filename_fn
from examples.exporl.utils import (
temp_stimulus_load_fn,
SparrKULeeSpectrogramKwargs,
BIDSAPRStimulusInfoExtractor,
bids_filename_fn,
)


def run_preprocessing_pipeline(
Expand Down

0 comments on commit 7562f39

Please sign in to comment.