From 99bd55917e998b7f51c7fd41069cd62eb5e9749a Mon Sep 17 00:00:00 2001 From: Wyatt Hoodes Date: Sun, 28 Jul 2019 10:45:04 -1000 Subject: [PATCH] zephyr: Fix typing for cred parameter. --- zerver/views/zephyr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zerver/views/zephyr.py b/zerver/views/zephyr.py index 544ef93d83..2d898dbbcd 100644 --- a/zerver/views/zephyr.py +++ b/zerver/views/zephyr.py @@ -13,6 +13,8 @@ import logging import subprocess import ujson +from typing import Optional + # Hack for mit.edu users whose Kerberos usernames don't match what they zephyr # as. The key is for Kerberos and the value is for zephyr. @@ -23,7 +25,7 @@ kerberos_alter_egos = { @authenticated_json_view @has_request_variables def webathena_kerberos_login(request: HttpRequest, user_profile: UserProfile, - cred: str=REQ(default=None)) -> HttpResponse: + cred: Optional[str]=REQ(default=None)) -> HttpResponse: global kerberos_alter_egos if cred is None: return json_error(_("Could not find Kerberos credential"))