diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c772e8c0..cfb827282 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - output passed to write_params_file as Path object ([#3435](https://github.com/nf-core/tools/pull/3435)) - chore(deps): update python:3.12-slim docker digest to 69ce3ae ([#3433](https://github.com/nf-core/tools/pull/3433)) - chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.4 ([#3438](https://github.com/nf-core/tools/pull/3438)) +- format name/value with YAML syntax ([#3442](https://github.com/nf-core/tools/pull/3442)) ## [v3.2.0 - Pewter Pangolin](https://github.com/nf-core/tools/releases/tag/3.2.0) - [2025-01-27] diff --git a/nf_core/pipelines/params_file.py b/nf_core/pipelines/params_file.py index 48e4dfe46..6699068b4 100644 --- a/nf_core/pipelines/params_file.py +++ b/nf_core/pipelines/params_file.py @@ -213,7 +213,7 @@ def format_param( out += _print_wrapped("Required", mode="none", indent=4) out += _print_wrapped("\n", mode="end") - out += f"# {name} = {json.dumps(default)}\n" + out += f"# {name}: {json.dumps(default)}\n" return out diff --git a/tests/pipelines/test_params_file.py b/tests/pipelines/test_params_file.py index 0450d3f99..723a8a561 100644 --- a/tests/pipelines/test_params_file.py +++ b/tests/pipelines/test_params_file.py @@ -64,4 +64,4 @@ def test_build_template_content(self): out = fh.read() assert "nf-core/testpipeline" in out - assert "# input = null" in out + assert "# input: null" in out