mirror of https://github.com/zulip/zulip.git
tools: Remove unused imports.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
a0041afaf9
commit
ee8ff4df66
|
@ -7,7 +7,7 @@ import sys
|
|||
import os
|
||||
|
||||
import ConfigParser
|
||||
from typing import Any, Dict, MutableMapping, Optional
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
# Scans zulip repositary for issues that don't have any `area` labels.
|
||||
# GitHub API token is required as GitHub limits unauthenticated
|
||||
|
|
|
@ -11,7 +11,7 @@ from lib import sanity_check
|
|||
sanity_check.check_venv(__file__)
|
||||
|
||||
from zulint import lister
|
||||
from typing import cast, Callable, Dict, Iterable, List
|
||||
from typing import cast, Dict, Iterable, List
|
||||
|
||||
EXCLUDED_FILES = [
|
||||
## Test data Files for testing modules in tests
|
||||
|
|
|
@ -5,12 +5,11 @@ from lib import sanity_check
|
|||
sanity_check.check_venv(__file__)
|
||||
|
||||
from collections import defaultdict
|
||||
from typing import Any, Dict, Iterable, List, Set
|
||||
from typing import Any, Dict, List, Set
|
||||
|
||||
import cgi
|
||||
import os
|
||||
import pprint
|
||||
import re
|
||||
import ujson
|
||||
|
||||
Call = Dict[str, Any]
|
||||
|
|
|
@ -7,7 +7,7 @@ from scrapy.linkextractors import IGNORED_EXTENSIONS
|
|||
from scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor
|
||||
from scrapy.utils.url import url_has_any_extension
|
||||
|
||||
from typing import Any, Generator, List, Optional, Tuple
|
||||
from typing import Any, Generator, List, Optional
|
||||
|
||||
EXCLUDED_URLS = [
|
||||
# Google calendar returns 404s on HEAD requests unconditionally
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
from lib.find_add_class import display, find
|
||||
import glob
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
# check for the venv
|
||||
from lib import sanity_check
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
from typing import List, Tuple, Set, Pattern, Match
|
||||
from typing import List, Tuple, Match
|
||||
import re
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
|
|
|
@ -3,7 +3,6 @@ from typing import Any, Dict, List
|
|||
|
||||
from .template_parser import (
|
||||
tokenize,
|
||||
Token,
|
||||
is_django_block_tag,
|
||||
)
|
||||
import subprocess
|
||||
|
|
|
@ -7,17 +7,16 @@ import platform
|
|||
import subprocess
|
||||
import glob
|
||||
import hashlib
|
||||
import traceback
|
||||
|
||||
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||
|
||||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
sys.path.append(ZULIP_PATH)
|
||||
from scripts.lib.zulip_tools import run, subprocess_text_output, OKBLUE, ENDC, WARNING, \
|
||||
from scripts.lib.zulip_tools import run, OKBLUE, ENDC, WARNING, \
|
||||
get_dev_uuid_var_path, FAIL, parse_lsb_release, file_or_package_hash_updated
|
||||
from scripts.lib.setup_venv import (
|
||||
setup_virtualenv, VENV_DEPENDENCIES, REDHAT_VENV_DEPENDENCIES,
|
||||
VENV_DEPENDENCIES, REDHAT_VENV_DEPENDENCIES,
|
||||
THUMBOR_VENV_DEPENDENCIES, YUM_THUMBOR_VENV_DEPENDENCIES,
|
||||
FEDORA_VENV_DEPENDENCIES
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ import time
|
|||
|
||||
from contextlib import contextmanager
|
||||
|
||||
from typing import (Any, Iterator, Optional)
|
||||
from typing import Iterator, Optional
|
||||
|
||||
# Verify the Zulip venv is available.
|
||||
from tools.lib import sanity_check
|
||||
|
|
|
@ -12,7 +12,7 @@ sanity_check.check_venv(__file__)
|
|||
|
||||
from zulint import lister
|
||||
from zulint.command import add_default_linter_arguments, LinterConfig
|
||||
from typing import cast, Callable, Dict, Iterator, List
|
||||
from typing import cast, Dict, List
|
||||
import random
|
||||
|
||||
def run():
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import subprocess
|
||||
|
||||
from zulint.linters import run_pycodestyle
|
||||
|
||||
from typing import List
|
||||
|
|
|
@ -6,7 +6,7 @@ import subprocess
|
|||
|
||||
from zulint.printer import print_err, colors
|
||||
|
||||
from typing import Any, Dict, List
|
||||
from typing import List
|
||||
|
||||
suppress_patterns = [
|
||||
(b'', b'imported but unused'),
|
||||
|
|
|
@ -6,7 +6,6 @@ import pwd
|
|||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
|
||||
from urllib.parse import urlunparse
|
||||
|
|
|
@ -11,7 +11,7 @@ from typing import Any, Dict, List, Optional
|
|||
|
||||
from emoji_setup_utils import generate_emoji_catalog, generate_codepoint_to_name_map, \
|
||||
get_emoji_code, generate_name_to_codepoint_map, emoji_names_for_picker, \
|
||||
EMOJISETS, EMOTICON_CONVERSIONS, REMAPPED_EMOJIS
|
||||
EMOTICON_CONVERSIONS, REMAPPED_EMOJIS
|
||||
from emoji_names import EMOJI_NAME_MAPS
|
||||
|
||||
ZULIP_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../')
|
||||
|
|
|
@ -8,7 +8,7 @@ if ZULIP_PATH not in sys.path:
|
|||
sys.path.append(ZULIP_PATH)
|
||||
|
||||
from scripts.lib.setup_venv import setup_virtualenv
|
||||
from scripts.lib.zulip_tools import run, subprocess_text_output
|
||||
from scripts.lib.zulip_tools import subprocess_text_output
|
||||
|
||||
VENV_PATH = "/srv/zulip-py3-venv"
|
||||
|
||||
|
|
|
@ -16,9 +16,7 @@ from zulip import Client
|
|||
|
||||
from tools.lib.test_script import get_provisioning_status
|
||||
from tools.lib.test_server import test_server_running
|
||||
from zerver.lib.api_test_helpers import test_the_api, test_invalid_api_key, \
|
||||
test_update_message_edit_permission_error, \
|
||||
test_user_not_authorized_error, test_authorization_errors_fatal
|
||||
from zerver.lib.api_test_helpers import test_the_api, test_invalid_api_key
|
||||
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.test_settings'
|
||||
django.setup()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from typing import List, Any
|
||||
from mypy_extensions import NoReturn
|
||||
import glob
|
||||
import argparse
|
||||
import os
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Dict, Any
|
||||
|
|
|
@ -10,7 +10,7 @@ import sys
|
|||
import tempfile
|
||||
import ujson
|
||||
|
||||
from typing import Optional, List, Tuple
|
||||
from typing import Optional, List
|
||||
|
||||
TOOLS_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
ZULIP_PATH = os.path.dirname(TOOLS_DIR)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Optional, Any
|
||||
from typing import Optional
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
|
|
|
@ -24,7 +24,6 @@ import json
|
|||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
|
||||
from django.conf import settings
|
||||
from zerver.lib.utils import split_by
|
||||
|
||||
FIXTURE_FILE = os.path.join(os.path.dirname(__file__), '../zerver/tests/fixtures/authors.json')
|
||||
duplicate_commits_file = os.path.join(os.path.dirname(__file__),
|
||||
|
|
|
@ -11,7 +11,7 @@ import sys
|
|||
|
||||
if False:
|
||||
# See https://zulip.readthedocs.io/en/latest/testing/mypy.html#mypy-in-production-scripts
|
||||
from typing import Any, Callable, Dict, List, Optional
|
||||
from typing import Any, Callable, Dict, List
|
||||
|
||||
from zulint.printer import print_err, colors
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ from __future__ import print_function
|
|||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
import os
|
||||
from itertools import cycle
|
||||
if False:
|
||||
# See https://zulip.readthedocs.io/en/latest/testing/mypy.html#mypy-in-production-scripts
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
import sys
|
||||
import os
|
||||
import argparse
|
||||
import time
|
||||
import json
|
||||
usage = """Export all messages on a given stream to a JSON dump.
|
||||
|
||||
|
|
Loading…
Reference in New Issue