zerver/lib: Change use of typing.Text to str.

This commit is contained in:
Aditya Bansal
2018-05-10 22:43:36 +05:30
committed by Tim Abbott
parent 2f3b2fbf59
commit 1f9244e060
43 changed files with 233 additions and 241 deletions

View File

@@ -2,9 +2,8 @@ from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
import re
from typing import Text
def validate_domain(domain: Text) -> None:
def validate_domain(domain: str) -> None:
if domain is None or len(domain) == 0:
raise ValidationError(_("Domain can't be empty."))
if '.' not in domain: