auth: Fix typing for authenticate_remote_user.

This commit is contained in:
Wyatt Hoodes 2019-07-26 12:49:33 -10:00 committed by Tim Abbott
parent 4149bac696
commit 0834514668
1 changed files with 2 additions and 1 deletions

View File

@ -360,7 +360,8 @@ def start_social_signup(request: HttpRequest, backend: str) -> HttpResponse:
backend_url = reverse('social:begin', args=[backend])
return oauth_redirect_to_root(request, backend_url, 'social', is_signup=True)
def authenticate_remote_user(realm: Realm, email_address: str) -> UserProfile:
def authenticate_remote_user(realm: Realm,
email_address: Optional[str]) -> Optional[UserProfile]:
if email_address is None:
# No need to authenticate if email address is None. We already
# know that user_profile would be None as well. In fact, if we