mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 21:03:45 +03:00
utils: Style fix and simplify a bit the VALID_USERNAME_RE
This commit is contained in:
parent
1669d80082
commit
0ec612d71a
|
@ -64,7 +64,7 @@ TG_JOIN_RE = re.compile(
|
||||||
#
|
#
|
||||||
# See https://telegram.org/blog/inline-bots#how-does-it-work
|
# See https://telegram.org/blog/inline-bots#how-does-it-work
|
||||||
VALID_USERNAME_RE = re.compile(
|
VALID_USERNAME_RE = re.compile(
|
||||||
r'^([a-z]((?!__)[\w\d]){3,30}[a-z\d]'
|
r'^([a-z](?:(?!__)\w){3,30}[a-z\d]'
|
||||||
r'|gif|vid|pic|bing|wiki|imdb|bold|vote|like|coub)$',
|
r'|gif|vid|pic|bing|wiki|imdb|bold|vote|like|coub)$',
|
||||||
re.IGNORECASE
|
re.IGNORECASE
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user