From 09d114659eb78d7e8357f0fca8048f55e8290741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Thu, 28 Mar 2024 11:28:20 -0400 Subject: [PATCH] STYLE: Linter the `import` statements Linter the `import` statements following the warning raised in https://github.com/nipreps/eddymotion/actions/runs/8458933073/job/23174220049#step:4:20 --- docs/conf.py | 4 +++- test/test_dmri.py | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c2c1a390..fb94ed84 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,8 +6,10 @@ http://www.sphinx-doc.org/en/master/config """ + from packaging.version import Version -from eddymotion import __version__, __copyright__, __packagename__ + +from eddymotion import __copyright__, __packagename__, __version__ # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, diff --git a/test/test_dmri.py b/test/test_dmri.py index f907b5c1..004a4e13 100644 --- a/test/test_dmri.py +++ b/test/test_dmri.py @@ -21,8 +21,10 @@ # https://www.nipreps.org/community/licensing/ # """Unit tests exercising the dMRI data structure.""" -import pytest + import numpy as np +import pytest + from eddymotion.data.dmri import load @@ -54,7 +56,11 @@ def test_load(datadir, tmp_path): assert np.allclose(dwi_h5.gradients, dwi_from_nifti1.gradients) # Try loading NIfTI + b-vecs/vals - dwi_from_nifti2 = load(dwi_nifti_path, bvec_file=bvecs_path, bval_file=bvals_path,) + dwi_from_nifti2 = load( + dwi_nifti_path, + bvec_file=bvecs_path, + bval_file=bvals_path, + ) assert np.allclose(dwi_h5.dataobj, dwi_from_nifti2.dataobj) assert np.allclose(dwi_h5.bzero, dwi_from_nifti2.bzero)