Fixed E721 (type-comparison): Use is and is not for type comparisons, or isinstance() for isinstance checks

This commit is contained in:
Teal Dulcet
2024-03-10 07:56:49 -04:00
committed by Joshua Tauberer
parent f0377dd59e
commit cacf6d2006
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ def disable_mfa(email, mfa_id, env):
return c.rowcount > 0
def validate_totp_secret(secret):
if type(secret) != str or secret.strip() == "":
if not isinstance(secret, str) or secret.strip() == "":
msg = "No secret provided."
raise ValueError(msg)
if len(secret) != 32: