From 189d432e3a92b3f465ba21c136470e69276ade5d Mon Sep 17 00:00:00 2001 From: PierreGtch <25532709+PierreGtch@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:59:47 +0200 Subject: [PATCH] Remove deprecated datasets from dataset_search results (#504) --- moabb/datasets/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/moabb/datasets/utils.py b/moabb/datasets/utils.py index cced7f7b6..7d3b42665 100644 --- a/moabb/datasets/utils.py +++ b/moabb/datasets/utils.py @@ -4,6 +4,7 @@ import moabb.datasets as db from moabb.datasets.base import BaseDataset +from moabb.utils import aliases_list dataset_list = [] @@ -53,6 +54,7 @@ def dataset_search( # noqa: C901 """ if len(dataset_list) == 0: _init_dataset_list() + deprecated_names, _, _ = zip(*aliases_list) channels = set(channels) out_data = [] @@ -63,6 +65,9 @@ def dataset_search( # noqa: C901 assert paradigm in ["imagery", "p300", "ssvep", None] for type_d in dataset_list: + if type_d.__name__ in deprecated_names: + continue + d = type_d() skip_dataset = False if multi_session and d.n_sessions < 2: