rename variable to prevent future confusion

pull/200/head
Aevann 2023-09-09 01:31:18 +03:00
parent 65684ef3e8
commit ee5748abd1
3 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ description_regex = re.compile("[^<>&\n\t]{1,300}", flags=re.A)
badge_name_regex = re.compile(r"[^\/.]+", flags=re.A)
valid_sub_regex = re.compile("^[\w\-]{3,25}$", flags=re.A)
hole_group_name_regex = re.compile("^[\w\-]{3,25}$", flags=re.A)
query_regex = re.compile("(\w+):(\S+)", flags=re.A)

View File

@ -29,7 +29,7 @@ def create_group(v):
if name.startswith('slots') or name.startswith('remindme'):
abort(400, "You can't make a group with that name!")
if not valid_sub_regex.fullmatch(name):
if not hole_group_name_regex.fullmatch(name):
abort(400, "Name does not match the required format!")
if name in {'everyone', 'jannies', 'followers', 'commenters'} or g.db.get(Group, name):

View File

@ -368,7 +368,7 @@ def create_sub2(v):
if not name: abort(400)
name = name.strip().lower()
if not valid_sub_regex.fullmatch(name):
if not hole_group_name_regex.fullmatch(name):
abort(400, "Name does not match the required format!")
if not v.charge_account('combined', HOLE_COST)[0]: