We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 705ce1d commit 85f047eCopy full SHA for 85f047e
2 files changed
specfile/changelog.py
@@ -244,7 +244,7 @@ def assemble(
244
if day_of_month_padding.endswith("0"):
245
header += f" {day_of_month_padding[:-1]}{timestamp.day:02}"
246
else:
247
- header += f" {day_of_month_padding}{timestamp.day}"
+ header += f"{day_of_month_padding}{timestamp.day: >2}"
248
249
# convert to extended format for openSUSE style changelogs
250
if style == ChangelogStyle.openSUSE and not isinstance(
tests/unit/test_changelog.py
@@ -452,9 +452,33 @@ def test_get_raw_section_data():
452
],
453
"0.4-1",
454
),
455
+ ChangelogEntry.assemble(
456
+ datetime.date(2026, 2, 9),
457
+ "Nikola Forró <nforro@redhat.com>",
458
+ [
459
+ "* whitespace day of month padding",
460
+ ],
461
+ "0.4-2",
462
+ day_of_month_padding=" ",
463
+ ),
464
465
+ datetime.date(2026, 2, 19),
466
467
468
+ "* whitespace day of month padding #2",
469
470
+ "0.4-3",
471
472
473
]
474
)
475
assert changelog.get_raw_section_data() == [
476
+ "* Thu Feb 19 2026 Nikola Forró <nforro@redhat.com> - 0.4-3",
477
478
+ "",
479
+ "* Mon Feb 9 2026 Nikola Forró <nforro@redhat.com> - 0.4-2",
480
481
482
"* Fri Jan 27 2023 Nikola Forró <nforro@redhat.com> - 0.4-1",
483
"",
484
"* this is also a valid entry",
0 commit comments