Skip to content

Commit 6572d1e

Browse files
CI: Pass ruff tests (#3243)
Apply the very simple fixes suggested by ruff. Fixes CI failures, probably related to a recent ruff upgrade.
1 parent b4cced1 commit 6572d1e

26 files changed

+26
-0
lines changed

.maint/paper_author_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Generate an author list for a new paper or abstract."""
3+
34
import json
45
import sys
56
from pathlib import Path

.maint/update_authors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Update and sort the creators list of the zenodo record."""
3+
34
import json
45
import sys
56
from pathlib import Path

.maint/update_zenodo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22
"""Update and sort the creators list of the zenodo record."""
3+
34
import json
45
import sys
56
from pathlib import Path

docs/sphinxext/github_link.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
This vendored script comes from scikit-learn:
33
https://github.com/scikit-learn/scikit-learn/blob/master/doc/sphinxext/github_link.py
44
"""
5+
56
import inspect
67
import os
78
import subprocess

fmriprep/_warnings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Manipulate Python warnings."""
24+
2425
import logging
2526
import warnings
2627

fmriprep/cli/parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Parser."""
24+
2425
import sys
2526

2627
from .. import config

fmriprep/cli/run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""fMRI preprocessing workflow."""
24+
2425
from .. import config
2526

2627

fmriprep/cli/tests/test_parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Test parser."""
24+
2425
from argparse import ArgumentError
2526
from contextlib import nullcontext
2627

fmriprep/cli/tests/test_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Test version checks."""
24+
2425
from datetime import datetime, timezone
2526
from os import getenv, geteuid
2627
from pathlib import Path

fmriprep/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
:py:class:`~bids.layout.BIDSLayout`, etc.)
8888
8989
"""
90+
9091
import os
9192
from multiprocessing import set_start_method
9293

fmriprep/interfaces/confounds.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
>>> import pandas as pd
3030
3131
"""
32+
3233
import os
3334
import re
3435

fmriprep/interfaces/gifti.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33
"""Interfaces for manipulating GIFTI files."""
4+
45
import os
56

67
import nibabel as nb

fmriprep/interfaces/multiecho.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
For using multi-echo EPI data.
2828
2929
"""
30+
3031
import os
3132

3233
from nipype import logging

fmriprep/interfaces/workbench.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33
"""This module provides interfaces for workbench surface commands."""
4+
45
import os
56

67
from nipype import logging

fmriprep/tests/test_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Check the configuration module and file."""
24+
2425
import os
2526
from unittest.mock import patch
2627

fmriprep/utils/bids.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Utilities to handle BIDS inputs."""
24+
2425
from __future__ import annotations
2526

2627
import json

fmriprep/utils/misc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Miscellaneous utilities."""
24+
2425
from functools import cache
2526

2627

fmriprep/utils/telemetry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Stripped out routines for telemetry"""
24+
2425
import os
2526
import re
2627

fmriprep/workflows/bold/confounds.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.. autofunction:: init_bold_confs_wf
2828
2929
"""
30+
3031
from nipype.algorithms import confounds as nac
3132
from nipype.interfaces import utility as niu
3233
from nipype.pipeline import engine as pe

fmriprep/workflows/bold/outputs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Writing out derivative files."""
24+
2425
from __future__ import annotations
2526

2627
import numpy as np

fmriprep/workflows/bold/registration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
.. autofunction:: init_fsl_bbr_wf
3030
3131
"""
32+
3233
import os
3334
import os.path as op
3435
import typing as ty

fmriprep/workflows/bold/resampling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
.. autofunction:: init_goodvoxels_bold_mask_wf
3131
3232
"""
33+
3334
from __future__ import annotations
3435

3536
import typing as ty

fmriprep/workflows/bold/stc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.. autofunction:: init_bold_stc_wf
2828
2929
"""
30+
3031
import nibabel as nb
3132
import numpy as np
3233
from nipype.interfaces import afni

fmriprep/workflows/bold/t2s.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.. autofunction:: init_bold_t2s_wf
2828
2929
"""
30+
3031
import typing as ty
3132

3233
from nipype.interfaces import utility as niu

fmriprep/workflows/tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Utilities and mocks for testing and documentation building."""
24+
2425
import os
2526
import shutil
2627
from contextlib import contextmanager

wrapper/src/fmriprep_docker/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
`NiPreps documentation <https://www.nipreps.org/intro/transparency/#citation-boilerplates>`__.
1616
Please report any feedback to our `GitHub repository <https://github.com/nipreps/fmriprep>`__.
1717
"""
18+
1819
import os
1920
import re
2021
import subprocess

0 commit comments

Comments
 (0)