refactor: autofix issues in 1 file

Resolved issues in TFR/server/account.py with DeepSource Autofix
This commit is contained in:
deepsource-autofix[bot] 2023-06-25 19:51:20 +00:00 committed by GitHub
parent 869262a8fe
commit 8995843f74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ def post_settings():
twitch = request.form.get("twitch", "").strip() twitch = request.form.get("twitch", "").strip()
youtube = request.form.get("youtube", "").strip() youtube = request.form.get("youtube", "").strip()
twitter_regex = re.compile("^(?!.*\.\.)(?!.*\.$)[\w.]{1,15}$") twitter_regex = re.compile(r"^(?!.*\.\.)(?!.*\.$)[\w.]{1,15}$")
twitch_regex = re.compile("^(?=.{4,25}$)(?!_)(?!.*[_.]{2})[a-zA-Z0-9._]+$") twitch_regex = re.compile("^(?=.{4,25}$)(?!_)(?!.*[_.]{2})[a-zA-Z0-9._]+$")
youtube_regex = re.compile("^(?!.*[._]{2})[a-zA-Z0-9._-]{1,50}$") youtube_regex = re.compile("^(?!.*[._]{2})[a-zA-Z0-9._-]{1,50}$")