From 995b300840de6f54d22dc9eddb082ed85da1c047 Mon Sep 17 00:00:00 2001 From: rht Date: Thu, 2 Nov 2017 12:39:10 +0100 Subject: [PATCH] zilencer: Remove unused imports (F401). --- zilencer/management/commands/add_mock_conversation.py | 3 --- zilencer/management/commands/add_new_realm.py | 1 - zilencer/management/commands/add_new_user.py | 2 +- zilencer/models.py | 3 +-- zilencer/urls.py | 1 - zilencer/views.py | 4 ++-- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/zilencer/management/commands/add_mock_conversation.py b/zilencer/management/commands/add_mock_conversation.py index 36d964bdcc..cf03e0ac10 100644 --- a/zilencer/management/commands/add_mock_conversation.py +++ b/zilencer/management/commands/add_mock_conversation.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- - from django.core.management.base import BaseCommand from zerver.lib.actions import create_stream_if_needed, \ internal_prep_stream_message, do_create_user, do_send_messages, \ @@ -8,8 +7,6 @@ from zerver.lib.actions import create_stream_if_needed, \ from zerver.lib.upload import upload_avatar_image from zerver.models import get_realm, UserProfile, Message -import argparse -from datetime import datetime from typing import Any, Dict, List class Command(BaseCommand): diff --git a/zilencer/management/commands/add_new_realm.py b/zilencer/management/commands/add_new_realm.py index a2bfca40f1..c2eace8a58 100644 --- a/zilencer/management/commands/add_new_realm.py +++ b/zilencer/management/commands/add_new_realm.py @@ -1,4 +1,3 @@ -from django.core.management.base import BaseCommand from zerver.lib.actions import do_create_user, do_create_realm from zerver.lib.management import ZulipBaseCommand from zerver.lib.onboarding import setup_initial_streams, \ diff --git a/zilencer/management/commands/add_new_user.py b/zilencer/management/commands/add_new_user.py index 89c318ef2e..1c0c3686a5 100644 --- a/zilencer/management/commands/add_new_user.py +++ b/zilencer/management/commands/add_new_user.py @@ -1,4 +1,4 @@ -from django.core.management.base import BaseCommand, CommandParser +from django.core.management.base import CommandParser from zerver.lib.actions import do_create_user from zerver.lib.management import ZulipBaseCommand from zerver.models import Realm, UserProfile diff --git a/zilencer/models.py b/zilencer/models.py index 54f0ddab7a..0e2e182251 100644 --- a/zilencer/models.py +++ b/zilencer/models.py @@ -1,6 +1,5 @@ from django.db import models -from django.db.models import Manager -from typing import Dict, Optional, Text +from typing import Text import zerver.models import datetime diff --git a/zilencer/urls.py b/zilencer/urls.py index 5fed170cfe..06804a80d2 100644 --- a/zilencer/urls.py +++ b/zilencer/urls.py @@ -4,7 +4,6 @@ from typing import Any from zerver.lib.rest import rest_dispatch import zilencer.views -import zerver.views.report i18n_urlpatterns = [] # type: Any diff --git a/zilencer/views.py b/zilencer/views.py index ed80b7f93c..6f3347dc4b 100644 --- a/zilencer/views.py +++ b/zilencer/views.py @@ -10,8 +10,8 @@ from zerver.lib.push_notifications import send_android_push_notification, \ send_apple_push_notification from zerver.lib.response import json_error, json_success from zerver.lib.request import has_request_variables, REQ -from zerver.lib.validator import check_dict, check_int -from zerver.models import UserProfile, PushDeviceToken, Realm +from zerver.lib.validator import check_int +from zerver.models import UserProfile from zerver.views.push_notifications import validate_token from typing import Any, Dict, Optional, Union, Text, cast