mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
tools: Change use of typing.Text to str.
This commit is contained in:
committed by
Tim Abbott
parent
a00f3b5843
commit
addfde7374
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
from lib.css_parser import parse, CssParserException
|
||||
from typing import Iterable, Text
|
||||
from typing import Iterable
|
||||
import sys
|
||||
import glob
|
||||
import subprocess
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from typing import List, Text
|
||||
from typing import List
|
||||
# check for the venv
|
||||
from lib import sanity_check
|
||||
sanity_check.check_venv(__file__)
|
||||
@@ -15,7 +15,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
from scripts.lib.zulip_tools import WARNING, FAIL, ENDC
|
||||
|
||||
def find_handlebars(translatable_strings):
|
||||
# type: (List[Text]) -> List[Text]
|
||||
# type: (List[str]) -> List[str]
|
||||
errored = []
|
||||
for string in translatable_strings:
|
||||
if '{{' in string:
|
||||
|
||||
@@ -7,7 +7,7 @@ import sys
|
||||
import os
|
||||
|
||||
import ConfigParser
|
||||
from typing import Any, Dict, MutableMapping, Optional, Text
|
||||
from typing import Any, Dict, MutableMapping, Optional
|
||||
|
||||
# Scans zulip repositary for issues that don't have any `area` labels.
|
||||
# GitHub API token is required as GitHub limits unauthenticated
|
||||
@@ -62,7 +62,7 @@ def check_issue_labels():
|
||||
"your api token. If you want to continue without using a token use --force.")
|
||||
sys.exit(1)
|
||||
|
||||
next_page_url = 'https://api.github.com/repos/zulip/zulip/issues' # type: Optional[Text]
|
||||
next_page_url = 'https://api.github.com/repos/zulip/zulip/issues' # type: Optional[str]
|
||||
unlabeled_issue_urls = []
|
||||
while next_page_url:
|
||||
try:
|
||||
|
||||
@@ -9,7 +9,7 @@ ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__f
|
||||
if ZULIP_PATH not in sys.path:
|
||||
sys.path.append(ZULIP_PATH)
|
||||
|
||||
from typing import List, Text
|
||||
from typing import List
|
||||
from zproject import settings
|
||||
from zulip_bots.lib import get_bots_directory_path
|
||||
|
||||
@@ -29,7 +29,7 @@ if os.path.isdir(bots_dir):
|
||||
os.makedirs(bots_dir, exist_ok=True)
|
||||
|
||||
def copyfiles(paths):
|
||||
# type: (List[Text]) -> None
|
||||
# type: (List[str]) -> None
|
||||
for src_path in paths:
|
||||
bot_name = os.path.basename(os.path.dirname(src_path))
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import re
|
||||
from lib import sanity_check
|
||||
sanity_check.check_venv(__file__)
|
||||
|
||||
from typing import IO, Text
|
||||
from typing import IO
|
||||
|
||||
# TODO: Convert this to use scripts/lib/queue_workers.py
|
||||
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -8,7 +8,7 @@ JSON data for the /team page contributors section.
|
||||
from lib import sanity_check
|
||||
sanity_check.check_venv(__file__)
|
||||
|
||||
from typing import Any, Dict, List, Optional, Union, Text, cast
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
from mypy_extensions import TypedDict
|
||||
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user