Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
refactor to fix pylint's cell-var-from-loop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fphammerle committed Aug 28, 2021
1 parent 0940b78 commit 4ca4ff1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions freesurfer_volume_reader/__main__.py
Expand Up @@ -76,11 +76,11 @@ def main():
}
volume_frames = []
for source_type in args.source_types:
find_volume_files = lambda dir_path: VOLUME_FILE_FINDERS[source_type].find(
root_dir_path=dir_path, filename_regex=filename_regexs[source_type]
)
finder = VOLUME_FILE_FINDERS[source_type]
for root_dir_path in args.root_dir_paths:
for volume_file in find_volume_files(root_dir_path):
for volume_file in finder.find(
root_dir_path=root_dir_path, filename_regex=filename_regexs[source_type]
):
volume_frame = volume_file.read_volumes_dataframe()
volume_frame["source_type"] = source_type
volume_frame["source_path"] = volume_file.absolute_path
Expand Down

0 comments on commit 4ca4ff1

Please sign in to comment.