diff --git a/fmriprep/_warnings.py b/fmriprep/_warnings.py index 60b3c2c9..bf738091 100644 --- a/fmriprep/_warnings.py +++ b/fmriprep/_warnings.py @@ -35,7 +35,7 @@ def _warn(message, category=None, stacklevel=1, source=None): category = type(category).__name__ category = category.replace('type', 'WARNING') - logging.getLogger('py.warnings').warning(f"{category or 'WARNING'}: {message}") + logging.getLogger('py.warnings').warning("%s: %s", category or 'WARNING', message) def _showwarning(message, category, filename, lineno, file=None, line=None): diff --git a/fmriprep/interfaces/reports.py b/fmriprep/interfaces/reports.py index 8f26c374..8f2a6270 100644 --- a/fmriprep/interfaces/reports.py +++ b/fmriprep/interfaces/reports.py @@ -365,7 +365,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 20047418..f414f830 100644 --- a/fmriprep/workflows/bold/stc.py +++ b/fmriprep/workflows/bold/stc.py @@ -115,7 +115,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 6af2e831..f32416f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -170,6 +170,7 @@ extend-select = [ # "EM", "EXE", "FA", + "G", "ISC", "ICN", "PT",