Fixed PLR6201 (literal-membership): Use a set literal when testing for membership

This commit is contained in:
Teal Dulcet
2024-03-10 07:54:51 -04:00
committed by Joshua Tauberer
parent cb922ec286
commit 49124cc9ca
11 changed files with 32 additions and 32 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ class AuthService:
return username, password
username, password = parse_http_authorization_basic(request.headers.get('Authorization', ''))
if username in (None, ""):
if username in {None, ""}:
raise ValueError("Authorization header invalid.")
if username.strip() == "" and password.strip() == "":