From 0f0ca3b71dcedf38728818b14f1ed93ce9ced113 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 27 Apr 2025 19:14:31 +0200 Subject: [PATCH] Minor formatting fixes. --- src/ledgplom/ledger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ledgplom/ledger.py b/src/ledgplom/ledger.py index 0b94d2f..1587fd7 100644 --- a/src/ledgplom/ledger.py +++ b/src/ledgplom/ledger.py @@ -132,7 +132,9 @@ class _DatLine: @property def raw(self) -> str: """Return as how to be written in .dat file's text content.""" - return self.code + ' ; '.join([''] + [s for s in [self.comment] if s]) + comment_part = ' ; '.join([''] + [s for s in [self.comment] if s]) + code_part = f'{self.code} ' if self.code else '' + return f'{code_part}{comment_part.lstrip()}' def copy(self) -> Self: """Create new instance copying the fields named in .to_copy.""" -- 2.30.2