From e999191cb2cd1ab59566e598616aad877226c678 Mon Sep 17 00:00:00 2001 From: mashehu Date: Fri, 10 Nov 2023 11:32:29 +0100 Subject: [PATCH] handle custom error messages from schemas --- nf_core/modules/lint/meta_yml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nf_core/modules/lint/meta_yml.py b/nf_core/modules/lint/meta_yml.py index 446cf6dbb8..69fb90c3f9 100644 --- a/nf_core/modules/lint/meta_yml.py +++ b/nf_core/modules/lint/meta_yml.py @@ -56,6 +56,8 @@ def meta_yml(module_lint_object, module): hint = f"\nCheck the entry for `{e.path[0]}`." if e.message.startswith("None is not of type 'object'") and len(e.path) > 2: hint = f"\nCheck that the child entries of {e.path[0]+'.'+e.path[2]} are indented correctly." + if e.schema.get("message"): + e.message = e.schema["message"] module.failed.append( ( "meta_yml_valid",