Skip to content

Commit

Permalink
chore(pep8): minimal style changes to pacify flake8 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Aug 14, 2020
1 parent a08116e commit 34c3016
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion niworkflows/func/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from nipype.pipeline import engine as pe
from nipype.interfaces import utility as niu, fsl, afni
from nipype.interfaces.ants.utils import AI

from templateflow.api import get as get_template

Expand Down Expand Up @@ -408,6 +407,7 @@ def init_enhance_and_skullstrip_bold_wf(
apply_mask = pe.Node(fsl.ApplyMask(), name="apply_mask")

if not pre_mask:
from nipype.interfaces.ants.utils import AI
from ..interfaces.nibabel import Binarize

bold_template = get_template(
Expand Down
6 changes: 4 additions & 2 deletions niworkflows/interfaces/fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .utils import _copyxform


class FixTraitApplyTransformsInputSpec(ApplyTransformsInputSpec):
class _FixTraitApplyTransformsInputSpec(ApplyTransformsInputSpec):
transforms = InputMultiObject(
traits.Either(File(exists=True), 'identity'),
argstr="%s",
Expand All @@ -26,13 +26,15 @@ class FixTraitApplyTransformsInputSpec(ApplyTransformsInputSpec):
"example, the last specified transform will be applied first.",
)


class FixHeaderApplyTransforms(ApplyTransforms):
"""
A replacement for nipype.interfaces.ants.resampling.ApplyTransforms that
fixes the resampled image header to match the xform of the reference
image
"""
input_spec = FixTraitApplyTransformsInputSpec

input_spec = _FixTraitApplyTransformsInputSpec

def _run_interface(self, runtime, correct_return_codes=(0,)):
# Run normally
Expand Down
4 changes: 2 additions & 2 deletions niworkflows/interfaces/itk.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
OutputMultiObject,
SimpleInterface,
)
from niworkflows.interfaces.fixes import FixTraitApplyTransformsInputSpec
from niworkflows.interfaces.fixes import _FixTraitApplyTransformsInputSpec

LOGGER = logging.getLogger("nipype.interface")

Expand Down Expand Up @@ -96,7 +96,7 @@ def _run_interface(self, runtime):
return runtime


class _MultiApplyTransformsInputSpec(FixTraitApplyTransformsInputSpec):
class _MultiApplyTransformsInputSpec(_FixTraitApplyTransformsInputSpec):
input_image = InputMultiObject(
File(exists=True),
mandatory=True,
Expand Down

0 comments on commit 34c3016

Please sign in to comment.