From 1e04537dea553b303fe85023f4b0c373454235e8 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:26:10 +0100 Subject: [PATCH] MNT: Add flake8-logging-format (G) rules to ruff --- fmriprep/interfaces/reports.py | 5 +++-- fmriprep/workflows/bold/stc.py | 2 +- pyproject.toml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fmriprep/interfaces/reports.py b/fmriprep/interfaces/reports.py index d5d5b4573..ca604a6a2 100644 --- a/fmriprep/interfaces/reports.py +++ b/fmriprep/interfaces/reports.py @@ -367,7 +367,8 @@ def get_world_pedir(ornt, pe_direction): if flip[not inv].startswith(axcode): return '-'.join(flip) LOGGER.warning( - 'Cannot determine world direction of phase encoding. ' - f'Orientation: {ornt}; PE dir: {pe_direction}' + 'Cannot determine world direction of phase encoding. Orientation: %s; PE dir: %s', + ornt, + pe_direction, ) return 'Could not be determined - assuming Anterior-Posterior' diff --git a/fmriprep/workflows/bold/stc.py b/fmriprep/workflows/bold/stc.py index 5f5ef7329..1961f4453 100644 --- a/fmriprep/workflows/bold/stc.py +++ b/fmriprep/workflows/bold/stc.py @@ -114,7 +114,7 @@ def init_bold_stc_wf( inputnode = pe.Node(niu.IdentityInterface(fields=['bold_file', 'skip_vols']), name='inputnode') outputnode = pe.Node(niu.IdentityInterface(fields=['stc_file']), name='outputnode') - LOGGER.log(25, f'BOLD series will be slice-timing corrected to an offset of {tzero:.3g}s.') + LOGGER.log(25, 'BOLD series will be slice-timing corrected to an offset of %.3gs.', tzero) # It would be good to fingerprint memory use of afni.TShift slice_timing_correction = pe.Node( diff --git a/pyproject.toml b/pyproject.toml index 320c3da77..e1579c6e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,6 +168,7 @@ extend-select = [ # "EM", "EXE", "FA", + "G", "ISC", "ICN", "PT",