Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

backends: Convert ExternalAuthDataDict to Python 3.6 style.

Anders Kaseorg635833958122
diff --git a/zproject/backends.py b/zproject/backends.py
index b53aac21b9e..6be92c34fde 100644
--- a/zproject/backends.py
+++ b/zproject/backends.py
@@ -953,18 +953,17 @@ def external_auth_method(cls: Type[ExternalAuthMethod]) -> Type[ExternalAuthMeth
# We want to be able to store this data in redis, so it has to be easy to serialize.
# That's why we avoid having fields that could pose a problem for that.
-ExternalAuthDataDict = TypedDict('ExternalAuthDataDict', {
- 'subdomain': str,
- 'full_name': str,
- 'email': str,
- 'is_signup': bool,
- 'is_realm_creation': bool,
- 'redirect_to': str,
- 'mobile_flow_otp': Optional[str],
- 'desktop_flow_otp': Optional[str],
- 'multiuse_object_key': str,
- 'full_name_validated': bool,
-}, total=False)
+class ExternalAuthDataDict(TypedDict, total=False):
+ subdomain: str
+ full_name: str
+ email: str
+ is_signup: bool
+ is_realm_creation: bool
+ redirect_to: str
+ mobile_flow_otp: Optional[str]
+ desktop_flow_otp: Optional[str]
+ multiuse_object_key: str
+ full_name_validated: bool
class ExternalAuthResult:
LOGIN_KEY_PREFIX = "login_key_"