From ef31a9ec0ee87cab289fad0a07d9f684d3de1c7d Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 23 Nov 2019 15:46:06 -0800 Subject: [PATCH] Revert "Avoid conversion, match only ASCII numbers" This reverts commit aa9c6983bc2c83edc04cc86bb04aa82655470a8e. --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 2a3da9c..58cb723 100644 --- a/bot.py +++ b/bot.py @@ -295,11 +295,11 @@ def cmd_uptime(match: Match[str]) -> Response: return UptimeResponse() -@handle_message(r'!pep[ ]?(?P\d{1,4})', flags=re.ASCII) +@handle_message(r'!pep[ ]?(?P\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)}/', )