Revert "Avoid conversion, match only ASCII numbers"

This reverts commit aa9c6983bc.
This commit is contained in:
Anthony Sottile 2019-11-23 15:46:06 -08:00
parent 7481955842
commit ef31a9ec0e
1 changed files with 2 additions and 2 deletions

4
bot.py
View File

@ -295,11 +295,11 @@ def cmd_uptime(match: Match[str]) -> Response:
return UptimeResponse()
@handle_message(r'!pep[ ]?(?P<pep_num>\d{1,4})', flags=re.ASCII)
@handle_message(r'!pep[ ]?(?P<pep_num>\d{1,4})')
def cmd_pep(match: Match[str]) -> Response:
*_, number = match.groups()
return MessageResponse(
match, f'https://www.python.org/dev/peps/pep-{number.zfill(4)}/',
match, f'https://www.python.org/dev/peps/pep-{int(number).zfill(4)}/',
)