From 5bd746a5bad4bdcc81016b9200d310aebd544cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Sun, 10 Mar 2024 17:52:00 +0100 Subject: [PATCH] Warnings for deprecated attribute in FixationTrains was oversensitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- pysaliency/datasets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysaliency/datasets.py b/pysaliency/datasets.py index a158c12..856a460 100644 --- a/pysaliency/datasets.py +++ b/pysaliency/datasets.py @@ -476,8 +476,8 @@ def __init__(self, train_xs, train_ys, train_ts, train_ns, train_subjects, scanp if attributes is None: attributes = {} - else: - warnings.warn("don't use attributes for FixationTrains, use scanpath_attributes or scanpath_fixation_attributes instead!") + elif attributes: + warnings.warn("don't use attributes for FixationTrains, use scanpath_attributes or scanpath_fixation_attributes instead!", stacklevel=2) self.auto_attributes = []