Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
the automatic reformatting broke some of the lint amnesty, so I undid
the automatic reformatting on those lines in particular.
  • Loading branch information
deborahgu committed Oct 28, 2024
1 parent e1928fd commit 3e8be1f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions openedx/core/djangoapps/user_authn/views/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ def _do_third_party_auth(request):
register_label_strong=HTML("<strong>{register_text}</strong>").format(register_text=_("Register")),
)

raise AuthFailedError(
message, error_code="third-party-auth-with-no-linked-account"
) # lint-amnesty, pylint: disable=raise-missing-from
raise AuthFailedError(message, error_code="third-party-auth-with-no-linked-account") # lint-amnesty, pylint: disable=raise-missing-from


def _get_user_by_email(email):
Expand Down Expand Up @@ -213,9 +211,7 @@ def _enforce_password_policy_compliance(request, user): # lint-amnesty, pylint:
send_password_reset_email_for_user(user, request)

# Prevent the login attempt.
raise AuthFailedError(
HTML(str(e)), error_code=e.__class__.__name__
) # lint-amnesty, pylint: disable=raise-missing-from
raise AuthFailedError(HTML(str(e)), error_code=e.__class__.__name__) # lint-amnesty, pylint: disable=raise-missing-from


def _log_and_raise_inactive_user_auth_error(unauthenticated_user):
Expand Down Expand Up @@ -745,9 +741,7 @@ class LoginSessionView(APIView):

@method_decorator(ensure_csrf_cookie)
def get(self, request, *args, **kwargs):
return HttpResponse(
get_login_session_form(request).to_json(), content_type="application/json"
) # lint-amnesty, pylint: disable=http-response-with-content-type-json
return HttpResponse(get_login_session_form(request).to_json(), content_type="application/json") # lint-amnesty, pylint: disable=http-response-with-content-type-json

@swagger_auto_schema(
request_body=login_user_schema,
Expand Down

0 comments on commit 3e8be1f

Please sign in to comment.