Skip to content

Commit

Permalink
export: Remove unused imports.
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk authored and timabbott committed Feb 3, 2019
1 parent e12c433 commit 56a675d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 19 deletions.
5 changes: 1 addition & 4 deletions zerver/data_import/gitter.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os
import dateutil.parser
import random
import requests
import logging
import shutil
import subprocess
import ujson

Expand All @@ -12,7 +9,7 @@
from django.utils.timezone import now as timezone_now
from typing import Any, Dict, List, Set, Tuple

from zerver.models import Realm, UserProfile, Recipient
from zerver.models import UserProfile, Recipient
from zerver.lib.export import MESSAGE_BATCH_CHUNK_SIZE
from zerver.data_import.import_util import ZerverFieldsT, build_zerver_realm, \
build_avatar, build_subscription, build_recipient, build_usermessages, \
Expand Down
2 changes: 0 additions & 2 deletions zerver/data_import/hipchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from typing import Any, Callable, Dict, List, Optional, Set

from django.conf import settings
from django.forms.models import model_to_dict
from django.utils.timezone import now as timezone_now

from zerver.lib.utils import (
Expand All @@ -22,7 +21,6 @@
from zerver.models import (
RealmEmoji,
Recipient,
UserProfile,
)

from zerver.data_import.import_util import (
Expand Down
2 changes: 1 addition & 1 deletion zerver/data_import/hipchat_subscriber.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Set
from typing import Dict, Set

class SubscriberHandler:
def __init__(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion zerver/data_import/import_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from zerver.data_import.sequencer import NEXT_ID
from zerver.lib.actions import STREAM_ASSIGNMENT_COLORS as stream_colors
from zerver.lib.avatar_hash import user_avatar_path_from_ids
from zerver.lib.parallel import run_parallel, JobData
from zerver.lib.parallel import run_parallel

# stubs
ZerverFieldsT = Dict[str, Any]
Expand Down
9 changes: 1 addition & 8 deletions zerver/data_import/slack.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import os
import ujson
import hashlib
import sys
import argparse
import shutil
import subprocess
import re
import logging
import random
import requests

from collections import defaultdict

from django.conf import settings
from django.db import connection
from django.utils.timezone import now as timezone_now
from django.forms.models import model_to_dict
from typing import Any, Dict, List, Optional, Tuple, Set, Iterator
from zerver.forms import check_subdomain_available
from zerver.models import Reaction, RealmEmoji, Realm, UserProfile, Recipient, \
from zerver.models import Reaction, RealmEmoji, UserProfile, Recipient, \
CustomProfileField, CustomProfileFieldValue
from zerver.data_import.slack_message_conversion import convert_to_zulip_markdown, \
get_user_full_name
Expand All @@ -28,7 +22,6 @@
process_emojis, build_realm, build_stream, build_message, \
create_converted_data_files, make_subscriber_map
from zerver.data_import.sequencer import NEXT_ID
from zerver.lib.parallel import run_parallel
from zerver.lib.upload import random_name, sanitize_name
from zerver.lib.export import MESSAGE_BATCH_CHUNK_SIZE
from zerver.lib.emoji import NAME_TO_CODEPOINT_PATH
Expand Down
4 changes: 1 addition & 3 deletions zerver/lib/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
from boto.s3.key import Key # for mypy
from django.apps import apps
from django.conf import settings
from django.db import connection
from django.forms.models import model_to_dict
from django.utils.timezone import make_aware as timezone_make_aware
from django.utils.timezone import utc as timezone_utc
from django.utils.timezone import is_naive as timezone_is_naive
import glob
import logging
Expand All @@ -27,7 +25,7 @@
UserGroupMembership, BotStorageData, BotConfigData
from zerver.lib.parallel import run_parallel
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, \
Iterable, Union
Union

# Custom mypy types follow:
Record = Dict[str, Any]
Expand Down

0 comments on commit 56a675d

Please sign in to comment.