-
-
Notifications
You must be signed in to change notification settings - Fork 481
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 78 in 08297fd
| def _pr_number_from_commit(comp: Comp) -> int: |
def _pr_number_from_commit(comp: Comp) -> int: <-------------------------------------HERE
# this is an ugly hack, but it appears to actually be the most reliably way to
# extract the most "reliable" way to extract the info we want from GH ¯\_(ツ)_/¯
message_head = comp.commit.message.split("\n\n")[0]
match = re.search(r"\(#(\d+)\)$", message_head)
if not match:
print(f"Could not find PR number in {message_head}") # noqa: T201
return int(match[1]) if match else None <--------------------------------------------HEREWhat to do: change the signature to -> int | None and remove implicit conversions in the places of use (filter(None, ...) is currently used, but the annotations are misleading).
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