mypy: Use Optional with strings where required.

This commit is contained in:
Eklavya Sharma
2017-05-23 14:04:54 -07:00
committed by Tim Abbott
parent 481d14df39
commit cc1937c8d5
4 changed files with 9 additions and 7 deletions

View File

@@ -207,7 +207,7 @@ def is_subdomain_root_or_alias(request):
return not subdomain or subdomain in settings.ROOT_SUBDOMAIN_ALIASES
def check_subdomain(realm_subdomain, user_subdomain):
# type: (Text, Text) -> bool
# type: (Optional[Text], Optional[Text]) -> bool
if settings.REALMS_HAVE_SUBDOMAINS and realm_subdomain is not None:
if (realm_subdomain == "" and user_subdomain is None):
return True