From cb8300a6bc68d8adaba6c9514ac71291e9a184a6 Mon Sep 17 00:00:00 2001 From: Gensollen Date: Thu, 27 Jun 2024 18:02:54 +0200 Subject: [PATCH] [FIX] Fix issue with enumeration as default value in CLI (#1217) --- clinica/iotools/converters/adni_to_bids/adni_to_bids_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clinica/iotools/converters/adni_to_bids/adni_to_bids_cli.py b/clinica/iotools/converters/adni_to_bids/adni_to_bids_cli.py index c981611c5..4b46a39ca 100644 --- a/clinica/iotools/converters/adni_to_bids/adni_to_bids_cli.py +++ b/clinica/iotools/converters/adni_to_bids/adni_to_bids_cli.py @@ -30,7 +30,7 @@ "--modalities", multiple=True, type=click.Choice(ADNIModality), - default=ADNIModality, + default=list(ADNIModality), help="Convert only the selected modality. By default, all available modalities are converted.", ) @click.option( @@ -46,7 +46,7 @@ def cli( subjects_list: Optional[str] = None, clinical_data_only: bool = False, force_new_extraction: bool = False, - modalities: Iterable[Union[str, ADNIModality]] = ADNIModality, + modalities: Optional[Iterable[Union[str, ADNIModality]]] = None, n_procs: Optional[int] = None, ) -> None: """ADNI to BIDS converter. @@ -67,7 +67,7 @@ def cli( clinical_data_directory, clinical_data_only=clinical_data_only, subjects=subjects_list, - modalities=modalities, + modalities=modalities or list(ADNIModality), xml_path=xml_path, force_new_extraction=force_new_extraction, n_procs=n_procs,