From 7826ef2ef105fafc4f23c4750ca310b9be2ddf8b Mon Sep 17 00:00:00 2001 From: bpinsard Date: Sun, 14 Jan 2024 21:02:01 -0500 Subject: [PATCH] conform with new style rules --- smriprep/cli/run.py | 5 ++--- smriprep/workflows/surfaces.py | 16 ++++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/smriprep/cli/run.py b/smriprep/cli/run.py index df60c9011a..6fc9bd0145 100644 --- a/smriprep/cli/run.py +++ b/smriprep/cli/run.py @@ -215,11 +215,10 @@ def get_parser(): '(default: OUTPUT_DIR/freesurfer)', ) g_fs.add_argument( - "--fs-reuse-base", + '--fs-reuse-base', action='store_true', dest='fs_reuse_base', - help='Reuse freesurfer base template' - '(from longitudinal preprocessing)', + help='Reuse freesurfer base template' '(from longitudinal preprocessing)', ) g_fs.add_argument( '--cifti-output', diff --git a/smriprep/workflows/surfaces.py b/smriprep/workflows/surfaces.py index e9fbcae650..bd53825cee 100644 --- a/smriprep/workflows/surfaces.py +++ b/smriprep/workflows/surfaces.py @@ -247,22 +247,21 @@ def init_surface_recon_wf( ) if not fs_reuse_base: + recon_config = pe.Node(FSDetectInputs(hires_enabled=hires), name='recon_config') - recon_config = pe.Node(FSDetectInputs(hires_enabled=hires), name="recon_config") - - fov_check = pe.Node(niu.Function(function=_check_cw256), name="fov_check") + fov_check = pe.Node(niu.Function(function=_check_cw256), name='fov_check') fov_check.inputs.default_flags = ['-noskullstrip', '-noT2pial', '-noFLAIRpial'] autorecon1 = pe.Node( - ReconAll(directive="autorecon1", openmp=omp_nthreads), - name="autorecon1", + ReconAll(directive='autorecon1', openmp=omp_nthreads), + name='autorecon1', n_procs=omp_nthreads, mem_gb=5, ) autorecon1.interface._can_resume = False autorecon1.interface._always_run = True - skull_strip_extern = pe.Node(FSInjectBrainExtracted(), name="skull_strip_extern") + skull_strip_extern = pe.Node(FSInjectBrainExtracted(), name='skull_strip_extern') autorecon_resume_wf = init_autorecon_resume_wf(omp_nthreads=omp_nthreads) @@ -303,10 +302,7 @@ def init_surface_recon_wf( ]) # fmt:on else: - fs_base_inputs = autorecon1 = pe.Node( - nio.FreeSurferSource(), - name='fs_base_inputs' - ) + fs_base_inputs = autorecon1 = pe.Node(nio.FreeSurferSource(), name='fs_base_inputs') # fmt:off workflow.connect([