-
-
Notifications
You must be signed in to change notification settings - Fork 478
Open
Labels
Bug 🐛This is something that is not working as expectedThis is something that is not working as expected
Description
Description
litestar/tools/prepare_release.py
Line 369 in 08297fd
def _write_changelog_entry(changelog_entry: str) -> None: |
def _write_changelog_entry(changelog_entry: str) -> None:
changelog_path = pathlib.Path("docs/release-notes/changelog.rst")
changelog_lines = changelog_path.read_text().splitlines()
line_no = next(
(i for i, line in enumerate(changelog_lines) if line.startswith(".. changelog::")),
None,
)
if not line_no:
raise ValueError("Changelog start not found")
changelog_lines[line_no:line_no] = changelog_entry.splitlines()
changelog_path.write_text("\n".join(changelog_lines))
if the marker is on the first line (index 0), the if not line_no condition will fail.
What to do: replace it with if line_no is None:.
URL to code causing the issue
No response
MCVE
Steps to reproduce
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Screenshots
No response
Logs
Litestar Version
2.17.0
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)
Metadata
Metadata
Assignees
Labels
Bug 🐛This is something that is not working as expectedThis is something that is not working as expected