From 18e3bee9c1f9db38208595712eef84758160e998 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Wed, 29 Nov 2023 18:28:45 +0100 Subject: [PATCH] ENH: remove final newline --- src/repoma/utilities/pyproject.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/repoma/utilities/pyproject.py b/src/repoma/utilities/pyproject.py index 77ef223e..1a3431ea 100644 --- a/src/repoma/utilities/pyproject.py +++ b/src/repoma/utilities/pyproject.py @@ -145,6 +145,7 @@ def write_pyproject( tomlkit.dump(config, target, sort_keys=True) elif isinstance(target, (Path, str)): src = tomlkit.dumps(config, sort_keys=True) + src = f"{src.strip()}\n" with open(target, "w") as stream: stream.write(src) else: