home · contact · privacy
Minor refactor.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 27 Apr 2025 17:08:47 +0000 (19:08 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 27 Apr 2025 17:08:47 +0000 (19:08 +0200)
src/ledgplom/ledger.py

index dcf8b841266b097aff66549d0903883ffe58d7af..0b94d2f139268f51cb2279d3caabc17141b58c8b 100644 (file)
@@ -179,9 +179,7 @@ class _GapLine(_DatLineSubclass):
 
     @classmethod
     def from_dat(cls, dat_line: _DatLine) -> Self:
-        if dat_line.code:  # if .code, turn whole line into comment
-            return cls('', dat_line.raw)
-        return cls('', dat_line.comment)
+        return cls('', dat_line.raw if dat_line.code else dat_line.comment)
 
 
 class _BookingLine(_DatLineSubclass):