scripts: Change use of typing.Text to str.

This commit is contained in:
Aditya Bansal 2018-05-14 03:55:35 +05:30
parent 610f48dcbc
commit cb9d8f6d48
3 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import os
import sys
if False:
from typing import Set, Text
from typing import Set
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(ZULIP_PATH)
@ -18,7 +18,7 @@ if ENV == "travis":
EMOJI_CACHE_PATH = os.path.join(os.environ["HOME"], "zulip-emoji-cache")
def get_caches_in_use(threshold_days):
# type: (int) -> Set[Text]
# type: (int) -> Set[str]
setups_to_check = set([ZULIP_PATH, ])
caches_in_use = set()

View File

@ -5,7 +5,7 @@ import subprocess
import sys
if False:
from typing import Set, Text
from typing import Set
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(ZULIP_PATH)
@ -26,7 +26,7 @@ if ENV == "travis":
sys.exit(0)
def get_caches_in_use(threshold_days):
# type: (int) -> Set[Text]
# type: (int) -> Set[str]
setups_to_check = set([ZULIP_PATH, ])
caches_in_use = set()

View File

@ -5,7 +5,7 @@ import subprocess
import sys
if False:
from typing import Set, Text
from typing import Set
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(ZULIP_PATH)
@ -36,7 +36,7 @@ def parse_args():
return args
def get_deployments_to_be_purged(recent_deployments):
# type: (Set[Text]) -> Set[Text]
# type: (Set[str]) -> Set[str]
all_deployments = set([os.path.join(DEPLOYMENTS_DIR, deployment)
for deployment in os.listdir(DEPLOYMENTS_DIR)])
deployments_to_purge = set()