Skip to content

Commit a4d0c71

Browse files
committed
STY: black
1 parent b7f3f43 commit a4d0c71

File tree

1 file changed

+49
-30
lines changed

1 file changed

+49
-30
lines changed

nibabies/interfaces/workbench.py

+49-30
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"PUTAMEN_LEFT",
3737
"PUTAMEN_RIGHT",
3838
"THALAMUS_LEFT",
39-
"THALAMUS_RIGHT"
39+
"THALAMUS_RIGHT",
4040
)
4141

4242

@@ -94,9 +94,9 @@ class CiftiCreateDenseFromTemplateInputSpec(CommandLineInputSpec):
9494
desc="the input is cropped to the size of the voxel data in the template file",
9595
)
9696
label_collision = traits.Enum(
97-
'ERROR',
98-
'SURFACES_FIRST',
99-
'LEGACY',
97+
"ERROR",
98+
"SURFACES_FIRST",
99+
"LEGACY",
100100
argstr="-label-collision %s",
101101
position=8,
102102
desc="how to handle conflicts between label keys, use 'LEGACY' to match v1.4.2 and earlier",
@@ -122,7 +122,9 @@ class CiftiCreateDenseFromTemplateInputSpec(CommandLineInputSpec):
122122
volume = InputMultiObject(
123123
traits.Either(
124124
traits.Tuple(traits.Enum(VALID_STRUCTURES), File(exists=True)),
125-
traits.Tuple(traits.Enum(VALID_STRUCTURES), File(exists=True), traits.Bool())
125+
traits.Tuple(
126+
traits.Enum(VALID_STRUCTURES), File(exists=True), traits.Bool()
127+
),
126128
),
127129
argstr="%s",
128130
position=12,
@@ -214,7 +216,7 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
214216
exists=True,
215217
argstr="-roi-left %s",
216218
position=4,
217-
requires=['left_metric'],
219+
requires=["left_metric"],
218220
desc="ROI (as metric file) of vertices to use from left surface",
219221
)
220222
right_metric = File(
@@ -227,7 +229,7 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
227229
exists=True,
228230
argstr="-roi-right %s",
229231
position=6,
230-
requires=['right_metric'],
232+
requires=["right_metric"],
231233
desc="ROI (as metric file) of vertices to use from right surface",
232234
)
233235
cerebellum_metric = File(
@@ -240,7 +242,7 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
240242
exists=True,
241243
argstr="-roi-cerebellum %s",
242244
position=8,
243-
requires=['cerebellum_metric'],
245+
requires=["cerebellum_metric"],
244246
desc="ROI (as metric file) of vertices to use from cerebellum",
245247
)
246248
timestep = traits.Float(
@@ -256,10 +258,14 @@ class CiftiCreateDenseTimeseriesInputSpec(CommandLineInputSpec):
256258
desc="the time at the first frame, in seconds",
257259
)
258260
unit = traits.Enum(
259-
"SECOND", "HERTZ", "METER", "RADIAN",
261+
"SECOND",
262+
"HERTZ",
263+
"METER",
264+
"RADIAN",
260265
usedefault=True,
261266
argstr="-unit %s",
262-
desc="use a unit other than time")
267+
desc="use a unit other than time",
268+
)
263269

264270

265271
class CiftiCreateDenseTimeseriesOutputSpec(TraitedSpec):
@@ -427,7 +433,9 @@ class CiftiDilateInputSpec(CommandLineInputSpec):
427433

428434

429435
class CiftiCreateLabelInputSpec(CommandLineInputSpec):
430-
out_file = File(mandatory=True, argstr="%s", position=0, desc="the output CIFTI file")
436+
out_file = File(
437+
mandatory=True, argstr="%s", position=0, desc="the output CIFTI file"
438+
)
431439
volume_label = File(
432440
exists=True,
433441
requires=["structure_label_volume"],
@@ -453,7 +461,7 @@ class CiftiCreateLabelInputSpec(CommandLineInputSpec):
453461
requires=["left_label"],
454462
argstr="-roi-left %s",
455463
position=4,
456-
desc="roi of vertices to use from left surface as a metric file"
464+
desc="roi of vertices to use from left surface as a metric file",
457465
)
458466
right_label = File(
459467
exists=True,
@@ -466,7 +474,7 @@ class CiftiCreateLabelInputSpec(CommandLineInputSpec):
466474
requires=["right_label"],
467475
argstr="-roi-right %s",
468476
position=6,
469-
desc="roi of vertices to use from right surface as a metric file"
477+
desc="roi of vertices to use from right surface as a metric file",
470478
)
471479
cerebellum_label = File(
472480
exists=True,
@@ -479,9 +487,10 @@ class CiftiCreateLabelInputSpec(CommandLineInputSpec):
479487
requires=["cerebellum_label"],
480488
argstr="-roi-cerebellum %s",
481489
position=8,
482-
desc="roi of vertices to use from cerebellum"
490+
desc="roi of vertices to use from cerebellum",
483491
)
484492

493+
485494
class CiftiCreateLabelOutputSpec(TraitedSpec):
486495
out_file = File(exists=True, desc="the output CIFTI file")
487496

@@ -592,7 +601,8 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
592601
desc="the CIFTI file to resample",
593602
)
594603
direction = traits.Enum(
595-
"ROW", "COLUMN",
604+
"ROW",
605+
"COLUMN",
596606
mandatory=True,
597607
argstr="%s",
598608
position=1,
@@ -606,21 +616,25 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
606616
desc="a CIFTI file containing the CIFTI space to resample to",
607617
)
608618
template_direction = traits.Enum(
609-
"ROW", "COLUMN",
619+
"ROW",
620+
"COLUMN",
610621
mandatory=True,
611622
argstr="%s",
612623
position=3,
613624
desc="the direction of the template to use as the resampling space",
614625
)
615626
surface_method = traits.Enum(
616-
"ADAP_BARY_AREA", "BARYCENTRIC",
627+
"ADAP_BARY_AREA",
628+
"BARYCENTRIC",
617629
mandatory=True,
618630
argstr="%s",
619631
position=4,
620632
desc="surface resampling method",
621633
)
622634
volume_method = traits.Enum(
623-
"CUBIC", "ENCLOSING_VOXEL", "TRILINEAR",
635+
"CUBIC",
636+
"ENCLOSING_VOXEL",
637+
"TRILINEAR",
624638
mandatory=True,
625639
argstr="%s",
626640
position=5,
@@ -657,7 +671,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
657671
xor=["volume_predilate_nearest"],
658672
argstr="-weighted",
659673
position=10,
660-
desc="use weighted dilation (default)"
674+
desc="use weighted dilation (default)",
661675
)
662676
volume_predilate_weighted_exponent = traits.Int(
663677
requires=["volume_predilate_weighted"],
@@ -714,7 +728,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
714728
exists=True,
715729
argstr="-affine %s",
716730
position=19,
717-
desc="affine file for transformation on the volume components"
731+
desc="affine file for transformation on the volume components",
718732
)
719733
affine_flirt_source = File(
720734
exists=True,
@@ -765,7 +779,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
765779
requires=["left_sphere_current", "left_area_surf_new"],
766780
argstr="-left-area-surfs %s",
767781
position=26,
768-
desc="a relevant left anatomical surface with current mesh"
782+
desc="a relevant left anatomical surface with current mesh",
769783
)
770784
left_area_surf_new = File(
771785
exists=True,
@@ -807,7 +821,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
807821
requires=["right_sphere_current", "right_area_surf_new"],
808822
argstr="-right-area-surfs %s",
809823
position=32,
810-
desc="a relevant right anatomical surface with current mesh"
824+
desc="a relevant right anatomical surface with current mesh",
811825
)
812826
right_area_surf_new = File(
813827
exists=True,
@@ -849,7 +863,7 @@ class CiftiResampleInputSpec(CommandLineInputSpec):
849863
requires=["cerebellum_sphere_current", "cerebellum_area_surf_new"],
850864
argstr="-cerebellum-area-surfs %s",
851865
position=38,
852-
desc="a relevant cerebellum anatomical surface with current mesh"
866+
desc="a relevant cerebellum anatomical surface with current mesh",
853867
)
854868
cerebellum_area_surf_new = File(
855869
exists=True,
@@ -937,12 +951,14 @@ class VolumeAffineResampleInputSpec(CommandLineInputSpec):
937951
desc="a volume file in the volume space you want for the output",
938952
)
939953
method = traits.Enum(
940-
"CUBIC", "ENCLOSING_VOXEL", "TRILINEAR",
954+
"CUBIC",
955+
"ENCLOSING_VOXEL",
956+
"TRILINEAR",
941957
mandatory=True,
942958
argstr="%s",
943959
position=2,
944960
desc="The resampling method. The recommended methods are CUBIC "
945-
"(cubic spline) for most data, and ENCLOSING_VOXEL for label data.",
961+
"(cubic spline) for most data, and ENCLOSING_VOXEL for label data.",
946962
)
947963
out_file = File(
948964
name_source=["in_file"],
@@ -967,12 +983,12 @@ class VolumeAffineResampleInputSpec(CommandLineInputSpec):
967983
flirt_source_volume = File(
968984
exists=True,
969985
desc="the source volume used when generating the affine; defaults to in_file",
970-
requires=['flirt'],
986+
requires=["flirt"],
971987
)
972988
flirt_target_volume = File(
973989
exists=True,
974990
desc="the target volume used when generating the affine; defaults to volume_space",
975-
requires=['flirt'],
991+
requires=["flirt"],
976992
)
977993

978994

@@ -1037,7 +1053,8 @@ class VolumeAllLabelsToROIsInputSpec(CommandLineInputSpec):
10371053
desc="the input volume label file",
10381054
)
10391055
label_map = traits.Either(
1040-
traits.Int, Str,
1056+
traits.Int,
1057+
Str,
10411058
mandatory=True,
10421059
argstr="%s",
10431060
position=1,
@@ -1086,7 +1103,8 @@ class VolumeLabelExportTableInputSpec(CommandLineInputSpec):
10861103
desc="the input volume label file",
10871104
)
10881105
label_map = traits.Either(
1089-
traits.Int, Str,
1106+
traits.Int,
1107+
Str,
10901108
mandatory=True,
10911109
argstr="%s",
10921110
position=1,
@@ -1158,7 +1176,8 @@ class VolumeLabelImportInputSpec(CommandLineInputSpec):
11581176
desc="the value that will be interpreted as unlabeled",
11591177
)
11601178
subvolume = traits.Either(
1161-
traits.Int, Str,
1179+
traits.Int,
1180+
Str,
11621181
argstr="-subvolume %s",
11631182
desc="select a single subvolume to import (number or name)",
11641183
)

0 commit comments

Comments
 (0)