From e87bd3aafa87cd6ef47c6f8e5fff910af2b3c909 Mon Sep 17 00:00:00 2001 From: BeritJanssen Date: Tue, 22 Oct 2024 07:43:01 +0200 Subject: [PATCH] fix linting issue --- backend/experiment/rules/rhythm_discrimination.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/experiment/rules/rhythm_discrimination.py b/backend/experiment/rules/rhythm_discrimination.py index 23c24afa8..ef7f1393c 100644 --- a/backend/experiment/rules/rhythm_discrimination.py +++ b/backend/experiment/rules/rhythm_discrimination.py @@ -112,7 +112,10 @@ def validate_playlist(self, playlist: Playlist): errors.append("Groups should have values 0, 1") except: errors.append("The sections should have integer groups") - pattern_error = lambda x: f"There should be 12 sections with pattern {m}" + + def pattern_error(pattern: str) -> str: + return f"There should be 12 sections with pattern {pattern}" + metric_standard = STIMULI["metric"]["standard"] for m in metric_standard: if sections.filter(song__name__startswith=m).count() != 12: