From ade00dd954f866a9d01c48ae87b6ccd3d1c7dce9 Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Fri, 11 May 2018 05:08:30 +0530 Subject: [PATCH] confirmation/models.py: Change use of typing.Text to str. --- confirmation/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confirmation/models.py b/confirmation/models.py index 58fc54eac8..c2967bab42 100644 --- a/confirmation/models.py +++ b/confirmation/models.py @@ -22,7 +22,7 @@ from zerver.models import PreregistrationUser, EmailChangeStatus, MultiuseInvite UserProfile, Realm from random import SystemRandom import string -from typing import Any, Dict, Optional, Text, Union +from typing import Any, Dict, Optional, Union class ConfirmationKeyException(Exception): WRONG_LENGTH = 1 @@ -102,7 +102,7 @@ class Confirmation(models.Model): REALM_CREATION = 7 type = models.PositiveSmallIntegerField() # type: int - def __str__(self) -> Text: + def __str__(self) -> str: return '' % (self.content_object,) class ConfirmationType: @@ -145,7 +145,7 @@ def validate_key(creation_key: Optional[str]) -> Optional['RealmCreationKey']: raise RealmCreationKey.Invalid() return key_record -def generate_realm_creation_url(by_admin: bool=False) -> Text: +def generate_realm_creation_url(by_admin: bool=False) -> str: key = generate_key() RealmCreationKey.objects.create(creation_key=key, date_created=timezone_now(),