Skip to content

Commit

Permalink
CI: Pass ruff tests (#3243)
Browse files Browse the repository at this point in the history
Apply the very simple fixes suggested by ruff.

Fixes CI failures, probably related to a recent ruff upgrade.
  • Loading branch information
DimitriPapadopoulos authored Mar 1, 2024
1 parent b4cced1 commit 6572d1e
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .maint/paper_author_list.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Generate an author list for a new paper or abstract."""

import json
import sys
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions .maint/update_authors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Update and sort the creators list of the zenodo record."""

import json
import sys
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions .maint/update_zenodo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Update and sort the creators list of the zenodo record."""

import json
import sys
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions docs/sphinxext/github_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This vendored script comes from scikit-learn:
https://github.com/scikit-learn/scikit-learn/blob/master/doc/sphinxext/github_link.py
"""

import inspect
import os
import subprocess
Expand Down
1 change: 1 addition & 0 deletions fmriprep/_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Manipulate Python warnings."""

import logging
import warnings

Expand Down
1 change: 1 addition & 0 deletions fmriprep/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Parser."""

import sys

from .. import config
Expand Down
1 change: 1 addition & 0 deletions fmriprep/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""fMRI preprocessing workflow."""

from .. import config


Expand Down
1 change: 1 addition & 0 deletions fmriprep/cli/tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Test parser."""

from argparse import ArgumentError
from contextlib import nullcontext

Expand Down
1 change: 1 addition & 0 deletions fmriprep/cli/tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Test version checks."""

from datetime import datetime, timezone
from os import getenv, geteuid
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions fmriprep/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
:py:class:`~bids.layout.BIDSLayout`, etc.)
"""

import os
from multiprocessing import set_start_method

Expand Down
1 change: 1 addition & 0 deletions fmriprep/interfaces/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
>>> import pandas as pd
"""

import os
import re

Expand Down
1 change: 1 addition & 0 deletions fmriprep/interfaces/gifti.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Interfaces for manipulating GIFTI files."""

import os

import nibabel as nb
Expand Down
1 change: 1 addition & 0 deletions fmriprep/interfaces/multiecho.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
For using multi-echo EPI data.
"""

import os

from nipype import logging
Expand Down
1 change: 1 addition & 0 deletions fmriprep/interfaces/workbench.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""This module provides interfaces for workbench surface commands."""

import os

from nipype import logging
Expand Down
1 change: 1 addition & 0 deletions fmriprep/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Check the configuration module and file."""

import os
from unittest.mock import patch

Expand Down
1 change: 1 addition & 0 deletions fmriprep/utils/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Utilities to handle BIDS inputs."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions fmriprep/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Miscellaneous utilities."""

from functools import cache


Expand Down
1 change: 1 addition & 0 deletions fmriprep/utils/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Stripped out routines for telemetry"""

import os
import re

Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/bold/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.. autofunction:: init_bold_confs_wf
"""

from nipype.algorithms import confounds as nac
from nipype.interfaces import utility as niu
from nipype.pipeline import engine as pe
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/bold/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Writing out derivative files."""

from __future__ import annotations

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/bold/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
.. autofunction:: init_fsl_bbr_wf
"""

import os
import os.path as op
import typing as ty
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/bold/resampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
.. autofunction:: init_goodvoxels_bold_mask_wf
"""

from __future__ import annotations

import typing as ty
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/bold/stc.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.. autofunction:: init_bold_stc_wf
"""

import nibabel as nb
import numpy as np
from nipype.interfaces import afni
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/bold/t2s.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.. autofunction:: init_bold_t2s_wf
"""

import typing as ty

from nipype.interfaces import utility as niu
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# https://www.nipreps.org/community/licensing/
#
"""Utilities and mocks for testing and documentation building."""

import os
import shutil
from contextlib import contextmanager
Expand Down
1 change: 1 addition & 0 deletions wrapper/src/fmriprep_docker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
`NiPreps documentation <https://www.nipreps.org/intro/transparency/#citation-boilerplates>`__.
Please report any feedback to our `GitHub repository <https://github.com/nipreps/fmriprep>`__.
"""

import os
import re
import subprocess
Expand Down

0 comments on commit 6572d1e

Please sign in to comment.