Revert "Avoid conversion, match only ASCII numbers"
This reverts commit aa9c6983bc.
This commit is contained in:
parent
7481955842
commit
ef31a9ec0e
4
bot.py
4
bot.py
|
|
@ -295,11 +295,11 @@ def cmd_uptime(match: Match[str]) -> Response:
|
||||||
return UptimeResponse()
|
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:
|
def cmd_pep(match: Match[str]) -> Response:
|
||||||
*_, number = match.groups()
|
*_, number = match.groups()
|
||||||
return MessageResponse(
|
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)}/',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue