Skip to content

Commit

Permalink
Refactor unnecessary else / elif when if block has a raise st…
Browse files Browse the repository at this point in the history
…atement (#33)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] committed Sep 28, 2022
1 parent 8bf94f0 commit 6c1b42e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion durin/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def authenticate(self, request):
if len(auth) == 1:
msg = _("Invalid token header. No credentials provided.")
raise exceptions.AuthenticationFailed(msg)
elif len(auth) > 2:
if len(auth) > 2:
msg = _("Invalid token header. " "Token string should not contain spaces.")
raise exceptions.AuthenticationFailed(msg)

Expand Down

0 comments on commit 6c1b42e

Please sign in to comment.