mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
scripts: Change use of typing.Text to str.
This commit is contained in:
@@ -4,7 +4,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
if False:
|
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__))))
|
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
sys.path.append(ZULIP_PATH)
|
sys.path.append(ZULIP_PATH)
|
||||||
@@ -18,7 +18,7 @@ if ENV == "travis":
|
|||||||
EMOJI_CACHE_PATH = os.path.join(os.environ["HOME"], "zulip-emoji-cache")
|
EMOJI_CACHE_PATH = os.path.join(os.environ["HOME"], "zulip-emoji-cache")
|
||||||
|
|
||||||
def get_caches_in_use(threshold_days):
|
def get_caches_in_use(threshold_days):
|
||||||
# type: (int) -> Set[Text]
|
# type: (int) -> Set[str]
|
||||||
setups_to_check = set([ZULIP_PATH, ])
|
setups_to_check = set([ZULIP_PATH, ])
|
||||||
caches_in_use = set()
|
caches_in_use = set()
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
if False:
|
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__))))
|
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
sys.path.append(ZULIP_PATH)
|
sys.path.append(ZULIP_PATH)
|
||||||
@@ -26,7 +26,7 @@ if ENV == "travis":
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
def get_caches_in_use(threshold_days):
|
def get_caches_in_use(threshold_days):
|
||||||
# type: (int) -> Set[Text]
|
# type: (int) -> Set[str]
|
||||||
setups_to_check = set([ZULIP_PATH, ])
|
setups_to_check = set([ZULIP_PATH, ])
|
||||||
caches_in_use = set()
|
caches_in_use = set()
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
if False:
|
if False:
|
||||||
from typing import Set, Text
|
from typing import Set
|
||||||
|
|
||||||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
sys.path.append(ZULIP_PATH)
|
sys.path.append(ZULIP_PATH)
|
||||||
@@ -36,7 +36,7 @@ def parse_args():
|
|||||||
return args
|
return args
|
||||||
|
|
||||||
def get_deployments_to_be_purged(recent_deployments):
|
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)
|
all_deployments = set([os.path.join(DEPLOYMENTS_DIR, deployment)
|
||||||
for deployment in os.listdir(DEPLOYMENTS_DIR)])
|
for deployment in os.listdir(DEPLOYMENTS_DIR)])
|
||||||
deployments_to_purge = set()
|
deployments_to_purge = set()
|
||||||
|
|||||||
Reference in New Issue
Block a user