Skip to content

Commit cb81d8b

Browse files
committed
fix: Drop deprecated TraitDictAnys
1 parent 8b6bd82 commit cb81d8b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

niworkflows/interfaces/bids.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,15 @@ class _PrepareDerivativeInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
312312
desc='a list entities that will not be propagated from the source file',
313313
)
314314
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
315-
meta_dict = traits.DictStrAny(desc='an input dictionary containing metadata')
315+
meta_dict = traits.Dict(Str, desc='an input dictionary containing metadata')
316316
source_file = InputMultiObject(
317317
File(exists=False), mandatory=True, desc='the source file(s) to extract entities from'
318318
)
319319

320320

321321
class _PrepareDerivativeOutputSpec(TraitedSpec):
322322
out_file = OutputMultiObject(File(exists=True), desc='derivative file path')
323-
out_meta = traits.DictStrAny(desc='derivative metadata')
323+
out_meta = traits.Dict(Str, desc='derivative metadata')
324324
out_path = OutputMultiObject(Str, desc='relative path in target directory')
325325
fixed_hdr = traits.List(traits.Bool, desc='whether derivative header was fixed')
326326

@@ -733,7 +733,7 @@ class _SaveDerivativeInputSpec(TraitedSpec):
733733
exists=True, mandatory=True, desc='Path to the base directory for storing data.'
734734
)
735735
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
736-
metadata = traits.DictStrAny(desc='metadata to be saved alongside the file')
736+
metadata = traits.Dict(Str, desc='metadata to be saved alongside the file')
737737
relative_path = InputMultiObject(
738738
traits.Str, desc='path to the file relative to the base directory'
739739
)
@@ -802,7 +802,7 @@ class _DerivativesDataSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
802802
desc='a list entities that will not be propagated from the source file',
803803
)
804804
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
805-
meta_dict = traits.DictStrAny(desc='an input dictionary containing metadata')
805+
meta_dict = traits.Dict(Str, desc='an input dictionary containing metadata')
806806
source_file = InputMultiObject(
807807
File(exists=False), mandatory=True, desc='the source file(s) to extract entities from'
808808
)

niworkflows/interfaces/norm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
BaseInterface,
3333
BaseInterfaceInputSpec,
3434
File,
35+
Str,
3536
isdefined,
3637
traits,
3738
)
@@ -100,7 +101,7 @@ class _SpatialNormalizationInputSpec(BaseInterfaceInputSpec):
100101
# Load other settings from file.
101102
settings = traits.List(File(exists=True), desc='pass on the list of settings files')
102103
# Resolution of the default template.
103-
template_spec = traits.DictStrAny(desc='template specifications')
104+
template_spec = traits.Dict(Str, desc='template specifications')
104105
template_resolution = traits.Enum(1, 2, None, desc='(DEPRECATED) template resolution')
105106
# Use explicit masking?
106107
explicit_masking = traits.Bool(

0 commit comments

Comments
 (0)