mirror of https://github.com/zulip/zulip.git
management: Remove unused imports in management commands.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
ee8ff4df66
commit
2a2e744b27
|
@ -1,8 +1,5 @@
|
|||
|
||||
import sys
|
||||
from typing import Any
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from zerver.lib.management import check_config
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
import shutil
|
||||
from typing import Any
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandParser, CommandError
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
import shutil
|
||||
from typing import Any
|
||||
|
||||
'''
|
||||
|
@ -24,7 +21,7 @@ spec:
|
|||
exporting-from-hipchat-server-or-data-center-for-data-portability-950821555.html
|
||||
'''
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandParser, CommandError
|
||||
from django.core.management.base import BaseCommand, CommandParser
|
||||
|
||||
from zerver.data_import.hipchat import do_convert_data
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
import shutil
|
||||
from typing import Any
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandParser, CommandError
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
from typing import Any, Callable, Dict, List, Set
|
||||
from typing import Any
|
||||
|
||||
from django.db import connection
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
from typing import Any
|
||||
|
||||
from typing import Any, Iterable, Tuple
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.db.models import Count
|
||||
|
||||
from zerver.lib.onboarding import create_if_missing_realm_internal_bots
|
||||
from zerver.models import Realm, UserProfile
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = """\
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
from typing import Any
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ condition. (Alternatively, you can set `EMAIL_DELIVERER_DISABLED=True`
|
|||
on all but one machine to make the command have no effect.)
|
||||
"""
|
||||
|
||||
import os
|
||||
import logging
|
||||
import time
|
||||
from typing import Any
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import logging
|
||||
import os
|
||||
import time
|
||||
from typing import Any, Dict
|
||||
from datetime import timedelta
|
||||
|
@ -13,7 +12,6 @@ from zerver.lib.logging_util import log_to_file
|
|||
from zerver.lib.management import sleep_forever
|
||||
from zerver.models import ScheduledMessage, Message, get_user_by_delivery_email
|
||||
from zerver.lib.actions import do_send_messages
|
||||
from zerver.lib.addressee import Addressee
|
||||
|
||||
## Setup ##
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -26,7 +26,7 @@ import email
|
|||
import logging
|
||||
from email.message import Message
|
||||
from imaplib import IMAP4_SSL
|
||||
from typing import Any, Generator, List
|
||||
from typing import Any, Generator
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import datetime
|
||||
import logging
|
||||
from typing import Any, List
|
||||
from typing import Any
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
from argparse import ArgumentParser
|
||||
from typing import Any, List
|
||||
|
||||
from confirmation.models import Confirmation, create_confirmation_link
|
||||
from zerver.lib.actions import ensure_stream, do_create_multiuse_invite_link
|
||||
from zerver.lib.management import ZulipBaseCommand
|
||||
from zerver.models import Stream
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import tarfile
|
||||
from typing import Any
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
from argparse import ArgumentParser
|
||||
import json
|
||||
import os
|
||||
import requests
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Any
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
from typing import Any
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
import logging
|
||||
from argparse import ArgumentParser
|
||||
from typing import Any, Dict, List, Optional
|
||||
from typing import Any, List
|
||||
|
||||
from django.contrib.auth.tokens import default_token_generator
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
from argparse import ArgumentParser
|
||||
|
||||
from zerver.lib.management import ZulipBaseCommand, CommandError
|
||||
from zerver.lib.send_email import send_email, FromAddress
|
||||
from zerver.lib.actions import do_send_realm_reactivation_email
|
||||
|
||||
from typing import Any
|
||||
|
|
|
@ -8,17 +8,13 @@ from email.mime.text import MIMEText
|
|||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import CommandParser
|
||||
from django.core.mail import send_mail
|
||||
|
||||
from zerver.lib.actions import encode_email_address
|
||||
from zerver.lib.email_mirror import logger, process_message
|
||||
from zerver.lib.send_email import FromAddress
|
||||
from zerver.lib.email_mirror import process_message
|
||||
from zerver.lib.management import ZulipBaseCommand
|
||||
|
||||
from zerver.models import Realm, get_stream, get_realm
|
||||
|
||||
from typing import Any, Dict
|
||||
|
||||
# This command loads an email from a specified file and sends it
|
||||
# to the email mirror. Simple emails can be passed in a JSON file,
|
||||
# Look at zerver/tests/fixtures/email/1.json for an example of how
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
from typing import Any
|
||||
|
||||
from django.core.management.base import CommandError
|
||||
|
||||
from zerver.lib.management import ZulipBaseCommand
|
||||
from zerver.models import get_realm
|
||||
|
||||
class Command(ZulipBaseCommand):
|
||||
help = """Show the admins in a realm."""
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
from typing import Any, Dict, List
|
||||
from typing import Any, Dict
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ from typing import Any, List
|
|||
|
||||
|
||||
from django.conf import settings
|
||||
from django.db.utils import IntegrityError
|
||||
|
||||
from zerver.lib.logging_util import log_to_file
|
||||
from zerver.lib.management import ZulipBaseCommand
|
||||
|
|
Loading…
Reference in New Issue