Skip to content

Commit

Permalink
Add comment explaining try/except purpose.
Browse files Browse the repository at this point in the history
  • Loading branch information
nusbaume committed Aug 20, 2024
1 parent ba0a966 commit 669dd98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/scripts/branch_pr_issue_closer.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def _main_prog():
#First try assuming the string is just a number
issue_num = int(first_word[1:]) #ignore "#" symbol
except ValueError:
#If not, then ignore last letter:
#If not, then ignore the last character, in case the user
#included punctutation (i.e. a space, comma, or period)
#after the PR number:
try:
issue_num = int(first_word[1:-1])
except ValueError:
Expand Down

0 comments on commit 669dd98

Please sign in to comment.