Skip to content

Commit 1f956a2

Browse files
committed
rf: move serialization to only when dumping
1 parent f298fdb commit 1f956a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

fmriprep/config.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,6 @@ def get(flat=False):
792792
'seeds': seeds.get(),
793793
}
794794

795-
if pg := settings['execution'].get('processing_groups'):
796-
settings['execution']['processing_groups'] = _serialize_pg(pg)
797-
798795
if not flat:
799796
return settings
800797

@@ -809,7 +806,12 @@ def dumps():
809806
"""Format config into toml."""
810807
from toml import dumps
811808

812-
return dumps(get())
809+
settings = get()
810+
# Serialize to play nice with TOML
811+
if pg := settings['execution'].get('processing_groups'):
812+
settings['execution']['processing_groups'] = _serialize_pg(pg)
813+
814+
return dumps(settings)
813815

814816

815817
def to_filename(filename):

0 commit comments

Comments
 (0)