diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 1433fe7537..93e6f4d8f3 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -125,8 +125,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3 + - name: Set up Python uses: actions/setup-python@v4 - with: - python-version: 3 - - run: pipx run flake8 sdcflows/ + - run: pipx run flake8-pyproject sdcflows/ + + # codespell: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: codespell-project/actions-codespell@v2 diff --git a/sdcflows/interfaces/tests/test_utils.py b/sdcflows/interfaces/tests/test_utils.py index 702ec5860d..d12d04cbc9 100644 --- a/sdcflows/interfaces/tests/test_utils.py +++ b/sdcflows/interfaces/tests/test_utils.py @@ -55,9 +55,7 @@ def test_ConvertWarp(tmpdir, shape): """Exercise the interface.""" tmpdir.chdir() - nb.Nifti1Image(np.zeros(shape, dtype="uint8"), np.eye(4), None).to_filename( - "3dQwarp.nii.gz" - ) + nb.Nifti1Image(np.zeros(shape, dtype="uint8"), np.eye(4), None).to_filename("3dQwarp.nii.gz") out = ConvertWarp(in_file="3dQwarp.nii.gz").run() @@ -80,9 +78,7 @@ def test_Xeoblique(tmpdir, angles, oblique): tmpdir.chdir() affine = nb.affines.from_matvec(nb.eulerangles.euler2mat(*angles)) - nb.Nifti1Image(np.zeros((10, 10, 10), dtype="uint8"), affine, None).to_filename( - "epi.nii.gz" - ) + nb.Nifti1Image(np.zeros((10, 10, 10), dtype="uint8"), affine, None).to_filename("epi.nii.gz") result = ( Deoblique( @@ -108,12 +104,15 @@ def test_Xeoblique(tmpdir, angles, oblique): assert np.allclose(nb.load(reoblique.out_epi).affine, affine) -@pytest.mark.parametrize("in_shape,expected_shape,padded", [ - ((2,2,2), (2,2,2), False), - ((2,2,3), (2,2,4), True), - ((3,3,2,2), (3,3,2,2), False), - ((3,3,3,2), (3,3,4,2), True), -]) +@pytest.mark.parametrize( + "in_shape,expected_shape,padded", + [ + ((2, 2, 2), (2, 2, 2), False), + ((2, 2, 3), (2, 2, 4), True), + ((3, 3, 2, 2), (3, 3, 2, 2), False), + ((3, 3, 3, 2), (3, 3, 4, 2), True), + ], +) def test_pad_slices(tmpdir, in_shape, expected_shape, padded): tmpdir.chdir()