From 902188043fee2a5df2eb5266f6c30bb91a1df554 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 15 Dec 2023 16:20:25 +0100 Subject: [PATCH] define tools_version for linting messages --- nf_core/lint/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nf_core/lint/__init__.py b/nf_core/lint/__init__.py index 86cfd1f639..c1c859ac5d 100644 --- a/nf_core/lint/__init__.py +++ b/nf_core/lint/__init__.py @@ -367,10 +367,10 @@ def format_result(test_results): Given an list of error message IDs and the message texts, return a nicely formatted string for the terminal with appropriate ASCII colours. """ + tools_version = __version__ + if "dev" in __version__: + tools_version = "latest" for eid, msg in test_results: - tools_version = __version__ - if "dev" in __version__: - tools_version = "latest" yield Markdown( f"[{eid}](https://nf-co.re/tools/docs/{tools_version}/pipeline_lint_tests/{eid}.html): {msg}" ) @@ -462,6 +462,10 @@ def _get_results_md(self): if len(self.failed) > 0: overall_result = "Failed :x:" + tools_version = __version__ + if "dev" in __version__: + tools_version = "latest" + # List of tests for details test_failure_count = "" test_failures = ""