diff --git a/analytics/management/commands/populate_analytics_db.py b/analytics/management/commands/populate_analytics_db.py index 14faf49966..0ef5c0ea63 100644 --- a/analytics/management/commands/populate_analytics_db.py +++ b/analytics/management/commands/populate_analytics_db.py @@ -1,4 +1,3 @@ - from datetime import datetime, timedelta from typing import Any, Dict, List, Mapping, Optional, Type diff --git a/analytics/tests/test_counts.py b/analytics/tests/test_counts.py index ed87f7897e..f801b75e02 100644 --- a/analytics/tests/test_counts.py +++ b/analytics/tests/test_counts.py @@ -1,4 +1,3 @@ - from datetime import datetime, timedelta from typing import Any, Dict, List, Optional, Tuple, Type diff --git a/analytics/views.py b/analytics/views.py index c9a5f6f4cd..dce7a33d82 100644 --- a/analytics/views.py +++ b/analytics/views.py @@ -1,4 +1,3 @@ - import itertools import logging import re diff --git a/puppet/zulip/files/nginx/zulip-include-frontend/uploads.types b/puppet/zulip/files/nginx/zulip-include-frontend/uploads.types index c6a39a64b1..b912f04484 100644 --- a/puppet/zulip/files/nginx/zulip-include-frontend/uploads.types +++ b/puppet/zulip/files/nginx/zulip-include-frontend/uploads.types @@ -1,4 +1,3 @@ - types { text/plain txt; diff --git a/puppet/zulip_ops/files/dot_emacs.el b/puppet/zulip_ops/files/dot_emacs.el index 61b13f5de9..9169adb7bb 100644 --- a/puppet/zulip_ops/files/dot_emacs.el +++ b/puppet/zulip_ops/files/dot_emacs.el @@ -1,4 +1,3 @@ - ; Move automatic backups into a directory off to the side (defvar backup-dir "~/.emacs-backups/") (setq backup-directory-alist (list (cons "." backup-dir))) diff --git a/puppet/zulip_ops/files/motd.lb0 b/puppet/zulip_ops/files/motd.lb0 index d827a57313..ec5fa4a5b5 100644 --- a/puppet/zulip_ops/files/motd.lb0 +++ b/puppet/zulip_ops/files/motd.lb0 @@ -1,4 +1,3 @@ - The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. diff --git a/puppet/zulip_ops/templates/nagios_autossh.template.erb b/puppet/zulip_ops/templates/nagios_autossh.template.erb index 73c7e3f881..15894e9bbe 100644 --- a/puppet/zulip_ops/templates/nagios_autossh.template.erb +++ b/puppet/zulip_ops/templates/nagios_autossh.template.erb @@ -1,4 +1,3 @@ - define service{ use generic-service host_name nagios diff --git a/scripts/lib/node_cache.py b/scripts/lib/node_cache.py index 94350bc594..7381f85949 100644 --- a/scripts/lib/node_cache.py +++ b/scripts/lib/node_cache.py @@ -1,4 +1,3 @@ - import os import hashlib import json diff --git a/scripts/lib/setup_venv.py b/scripts/lib/setup_venv.py index 5ad6808eb0..72801b578b 100644 --- a/scripts/lib/setup_venv.py +++ b/scripts/lib/setup_venv.py @@ -1,4 +1,3 @@ - import logging import os import shutil diff --git a/static/js/scroll_bar.js b/static/js/scroll_bar.js index 55ffa672c9..00562e5d2f 100644 --- a/static/js/scroll_bar.js +++ b/static/js/scroll_bar.js @@ -1,4 +1,3 @@ - var scroll_bar = (function () { var exports = {}; diff --git a/static/styles/drafts.scss b/static/styles/drafts.scss index b345b2dcb1..b0e4784b0e 100644 --- a/static/styles/drafts.scss +++ b/static/styles/drafts.scss @@ -1,4 +1,3 @@ - .drafts-container { position: relative; height: 95%; diff --git a/templates/zerver/why-zulip.md b/templates/zerver/why-zulip.md index 07e963b34d..1358037b29 100644 --- a/templates/zerver/why-zulip.md +++ b/templates/zerver/why-zulip.md @@ -1,4 +1,3 @@ - There are a lot of team chat apps. So why did we build Zulip? We talk about Slack in the discussion below, but the problems apply equally diff --git a/tools/documentation_crawler/scrapy.cfg b/tools/documentation_crawler/scrapy.cfg index 0eec1a808f..6d8440f21b 100644 --- a/tools/documentation_crawler/scrapy.cfg +++ b/tools/documentation_crawler/scrapy.cfg @@ -1,4 +1,3 @@ - [settings] default = documentation_crawler.settings diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py index 0e5f87ff2d..a27567476f 100644 --- a/tools/lib/capitalization.py +++ b/tools/lib/capitalization.py @@ -1,4 +1,3 @@ - from typing import List, Tuple, Match import re diff --git a/tools/lib/find_add_class.py b/tools/lib/find_add_class.py index 5083d271c4..4c40ec7aad 100644 --- a/tools/lib/find_add_class.py +++ b/tools/lib/find_add_class.py @@ -1,4 +1,3 @@ - from typing import List, Set, Tuple import os diff --git a/tools/lib/graph.py b/tools/lib/graph.py index 8826987c49..da4ebe860d 100644 --- a/tools/lib/graph.py +++ b/tools/lib/graph.py @@ -1,4 +1,3 @@ - from collections import defaultdict from typing import Callable, DefaultDict, Iterator, List, Optional, Set, Tuple diff --git a/tools/lib/pretty_print.py b/tools/lib/pretty_print.py index a44ae6a7b1..11d80fa8e5 100644 --- a/tools/lib/pretty_print.py +++ b/tools/lib/pretty_print.py @@ -1,4 +1,3 @@ - from typing import Any, Dict, List from .template_parser import ( diff --git a/tools/lib/test_server.py b/tools/lib/test_server.py index 6a206a2503..279c376ae9 100644 --- a/tools/lib/test_server.py +++ b/tools/lib/test_server.py @@ -1,4 +1,3 @@ - import os import subprocess import sys diff --git a/tools/tests/test_html_branches.py b/tools/tests/test_html_branches.py index 158c0097ca..ccce328923 100644 --- a/tools/tests/test_html_branches.py +++ b/tools/tests/test_html_branches.py @@ -1,4 +1,3 @@ - import unittest import os diff --git a/zerver/apps.py b/zerver/apps.py index 32e0bfff78..3dabc73806 100644 --- a/zerver/apps.py +++ b/zerver/apps.py @@ -1,4 +1,3 @@ - import logging from typing import Any diff --git a/zerver/decorator.py b/zerver/decorator.py index 30ac1e657e..9bc1b31b03 100644 --- a/zerver/decorator.py +++ b/zerver/decorator.py @@ -1,4 +1,3 @@ - import django_otp from two_factor.utils import default_device from django_otp import user_has_device, _user_is_authenticated diff --git a/zerver/filters.py b/zerver/filters.py index 384d0c5805..f74eae3aae 100644 --- a/zerver/filters.py +++ b/zerver/filters.py @@ -1,4 +1,3 @@ - import re from typing import Any, Dict diff --git a/zerver/forms.py b/zerver/forms.py index 62afcb7dcf..70cf8a956c 100644 --- a/zerver/forms.py +++ b/zerver/forms.py @@ -1,4 +1,3 @@ - from django import forms from django.conf import settings from django.contrib.auth import authenticate diff --git a/zerver/lib/addressee.py b/zerver/lib/addressee.py index 2ab1e3771f..903aa63d30 100644 --- a/zerver/lib/addressee.py +++ b/zerver/lib/addressee.py @@ -1,4 +1,3 @@ - from typing import Iterable, List, Optional, Sequence, Union, cast from django.utils.translation import ugettext as _ diff --git a/zerver/lib/alert_words.py b/zerver/lib/alert_words.py index 1d17ebf022..db5c8090b2 100644 --- a/zerver/lib/alert_words.py +++ b/zerver/lib/alert_words.py @@ -1,4 +1,3 @@ - from django.db.models import Q from zerver.models import UserProfile, Realm from zerver.lib.cache import cache_with_key, realm_alert_words_cache_key, \ diff --git a/zerver/lib/attachments.py b/zerver/lib/attachments.py index 5650d8651d..ededc38cbb 100644 --- a/zerver/lib/attachments.py +++ b/zerver/lib/attachments.py @@ -1,4 +1,3 @@ - from django.utils.translation import ugettext as _ from typing import Any, Dict, List diff --git a/zerver/lib/avatar_hash.py b/zerver/lib/avatar_hash.py index f0ea481b19..ac645c9614 100644 --- a/zerver/lib/avatar_hash.py +++ b/zerver/lib/avatar_hash.py @@ -1,4 +1,3 @@ - from django.conf import settings from zerver.lib.utils import make_safe_digest diff --git a/zerver/lib/create_user.py b/zerver/lib/create_user.py index fc035524e6..a53eec21e5 100644 --- a/zerver/lib/create_user.py +++ b/zerver/lib/create_user.py @@ -1,4 +1,3 @@ - from django.contrib.auth.models import UserManager from django.utils.timezone import now as timezone_now from zerver.models import UserProfile, Recipient, Subscription, Realm, Stream diff --git a/zerver/lib/db.py b/zerver/lib/db.py index c74a1ea648..7b362c8ee5 100644 --- a/zerver/lib/db.py +++ b/zerver/lib/db.py @@ -1,4 +1,3 @@ - import time from psycopg2.extensions import cursor, connection diff --git a/zerver/lib/debug.py b/zerver/lib/debug.py index fc112ccffe..5e1b047555 100644 --- a/zerver/lib/debug.py +++ b/zerver/lib/debug.py @@ -1,4 +1,3 @@ - import code import gc import logging diff --git a/zerver/lib/email_notifications.py b/zerver/lib/email_notifications.py index cb85330a35..49dbe1cbb1 100644 --- a/zerver/lib/email_notifications.py +++ b/zerver/lib/email_notifications.py @@ -1,4 +1,3 @@ - from typing import Any, Dict, Iterable, List, Optional, Tuple, Union from confirmation.models import one_click_unsubscribe_link diff --git a/zerver/lib/emoji.py b/zerver/lib/emoji.py index 19f4400db7..66cee092ed 100644 --- a/zerver/lib/emoji.py +++ b/zerver/lib/emoji.py @@ -1,4 +1,3 @@ - import os import re import ujson diff --git a/zerver/lib/feedback.py b/zerver/lib/feedback.py index fd9b0ad87e..06eb1a5e76 100644 --- a/zerver/lib/feedback.py +++ b/zerver/lib/feedback.py @@ -1,4 +1,3 @@ - from django.conf import settings from django.core.mail import EmailMessage from typing import Any, Mapping, Optional diff --git a/zerver/lib/fix_unreads.py b/zerver/lib/fix_unreads.py index 72c8c80781..cab0fa24c8 100644 --- a/zerver/lib/fix_unreads.py +++ b/zerver/lib/fix_unreads.py @@ -1,4 +1,3 @@ - import time import logging diff --git a/zerver/lib/initial_password.py b/zerver/lib/initial_password.py index a10f8da321..4e2d5360f9 100644 --- a/zerver/lib/initial_password.py +++ b/zerver/lib/initial_password.py @@ -1,4 +1,3 @@ - from django.conf import settings import hashlib diff --git a/zerver/lib/mention.py b/zerver/lib/mention.py index 4ccc18c2a4..979aca5829 100644 --- a/zerver/lib/mention.py +++ b/zerver/lib/mention.py @@ -1,4 +1,3 @@ - from typing import Optional, Set, Tuple import re diff --git a/zerver/lib/message.py b/zerver/lib/message.py index afe8dbd41f..1cdcd3fa71 100644 --- a/zerver/lib/message.py +++ b/zerver/lib/message.py @@ -1,4 +1,3 @@ - import datetime import ujson import zlib diff --git a/zerver/lib/onboarding.py b/zerver/lib/onboarding.py index 06aad6de92..3dc2265521 100644 --- a/zerver/lib/onboarding.py +++ b/zerver/lib/onboarding.py @@ -1,4 +1,3 @@ - from django.conf import settings from zerver.lib.actions import \ diff --git a/zerver/lib/profile.py b/zerver/lib/profile.py index bc1b295bcc..e020f04a3d 100644 --- a/zerver/lib/profile.py +++ b/zerver/lib/profile.py @@ -1,4 +1,3 @@ - import cProfile from functools import wraps diff --git a/zerver/lib/rate_limiter.py b/zerver/lib/rate_limiter.py index ccd3f1402d..402c25dc1e 100644 --- a/zerver/lib/rate_limiter.py +++ b/zerver/lib/rate_limiter.py @@ -1,4 +1,3 @@ - import os from typing import List, Optional, Tuple diff --git a/zerver/lib/redis_utils.py b/zerver/lib/redis_utils.py index d7fc0195d4..f02020fedf 100644 --- a/zerver/lib/redis_utils.py +++ b/zerver/lib/redis_utils.py @@ -1,4 +1,3 @@ - from django.conf import settings import redis diff --git a/zerver/lib/response.py b/zerver/lib/response.py index 2de1d865a3..da25cf74a3 100644 --- a/zerver/lib/response.py +++ b/zerver/lib/response.py @@ -1,4 +1,3 @@ - from django.http import HttpResponse, HttpResponseNotAllowed import ujson diff --git a/zerver/lib/rest.py b/zerver/lib/rest.py index 0586237d0c..563fa8cb17 100644 --- a/zerver/lib/rest.py +++ b/zerver/lib/rest.py @@ -1,4 +1,3 @@ - from functools import wraps from typing import Any, Callable, Dict diff --git a/zerver/lib/retention.py b/zerver/lib/retention.py index ed58d4dada..bdf87cb579 100644 --- a/zerver/lib/retention.py +++ b/zerver/lib/retention.py @@ -1,4 +1,3 @@ - from datetime import timedelta from django.conf import settings diff --git a/zerver/lib/sessions.py b/zerver/lib/sessions.py index fc57eb5112..4f74073cbb 100644 --- a/zerver/lib/sessions.py +++ b/zerver/lib/sessions.py @@ -1,4 +1,3 @@ - import logging from django.conf import settings diff --git a/zerver/lib/stream_recipient.py b/zerver/lib/stream_recipient.py index dd078c6a15..8015ed4292 100644 --- a/zerver/lib/stream_recipient.py +++ b/zerver/lib/stream_recipient.py @@ -1,4 +1,3 @@ - from typing import (Dict, List) from django.db import connection diff --git a/zerver/lib/streams.py b/zerver/lib/streams.py index e98d0df35c..4577d74f00 100644 --- a/zerver/lib/streams.py +++ b/zerver/lib/streams.py @@ -1,4 +1,3 @@ - from typing import Any, Iterable, List, Mapping, Set, Tuple, Optional from django.utils.translation import ugettext as _ diff --git a/zerver/lib/test_runner.py b/zerver/lib/test_runner.py index fedad98db9..892d4b17c8 100644 --- a/zerver/lib/test_runner.py +++ b/zerver/lib/test_runner.py @@ -1,4 +1,3 @@ - from functools import partial import random diff --git a/zerver/lib/tex.py b/zerver/lib/tex.py index 43c85c0ded..429f2d6d7a 100644 --- a/zerver/lib/tex.py +++ b/zerver/lib/tex.py @@ -1,4 +1,3 @@ - import logging import os import subprocess diff --git a/zerver/lib/timezone.py b/zerver/lib/timezone.py index 231111e5c6..acceedad28 100644 --- a/zerver/lib/timezone.py +++ b/zerver/lib/timezone.py @@ -1,4 +1,3 @@ - from typing import List import pytz diff --git a/zerver/lib/type_debug.py b/zerver/lib/type_debug.py index c6936e3a47..3a225a1421 100644 --- a/zerver/lib/type_debug.py +++ b/zerver/lib/type_debug.py @@ -1,4 +1,3 @@ - import sys import functools diff --git a/zerver/lib/unminify.py b/zerver/lib/unminify.py index ffcd72aaa1..182b1c736c 100644 --- a/zerver/lib/unminify.py +++ b/zerver/lib/unminify.py @@ -1,4 +1,3 @@ - import re import os import sourcemap diff --git a/zerver/management/commands/add_users_to_mailing_list.py b/zerver/management/commands/add_users_to_mailing_list.py index b3dd473e96..81c7ae2042 100644 --- a/zerver/management/commands/add_users_to_mailing_list.py +++ b/zerver/management/commands/add_users_to_mailing_list.py @@ -1,4 +1,3 @@ - import argparse from datetime import datetime from typing import Any, Optional diff --git a/zerver/management/commands/add_users_to_streams.py b/zerver/management/commands/add_users_to_streams.py index 3797d480a2..e3e536133a 100644 --- a/zerver/management/commands/add_users_to_streams.py +++ b/zerver/management/commands/add_users_to_streams.py @@ -1,4 +1,3 @@ - from typing import Any from django.core.management.base import CommandParser diff --git a/zerver/management/commands/bankrupt_users.py b/zerver/management/commands/bankrupt_users.py index b58b2b53f4..f81fd11add 100644 --- a/zerver/management/commands/bankrupt_users.py +++ b/zerver/management/commands/bankrupt_users.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/bulk_change_user_name.py b/zerver/management/commands/bulk_change_user_name.py index 8910b1c8a5..b4c7d1b0a2 100644 --- a/zerver/management/commands/bulk_change_user_name.py +++ b/zerver/management/commands/bulk_change_user_name.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/change_user_email.py b/zerver/management/commands/change_user_email.py index 564f37cadf..fd27c9fb1d 100644 --- a/zerver/management/commands/change_user_email.py +++ b/zerver/management/commands/change_user_email.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/check_redis.py b/zerver/management/commands/check_redis.py index 6e49ef2942..b7bd86be06 100644 --- a/zerver/management/commands/check_redis.py +++ b/zerver/management/commands/check_redis.py @@ -1,4 +1,3 @@ - import logging import time from typing import Any, Callable, Optional diff --git a/zerver/management/commands/compilemessages.py b/zerver/management/commands/compilemessages.py index 17d702acf1..fc45025e58 100644 --- a/zerver/management/commands/compilemessages.py +++ b/zerver/management/commands/compilemessages.py @@ -1,4 +1,3 @@ - import json import os import polib diff --git a/zerver/management/commands/convert_gitter_data.py b/zerver/management/commands/convert_gitter_data.py index 92b10466be..a4cd5766dd 100644 --- a/zerver/management/commands/convert_gitter_data.py +++ b/zerver/management/commands/convert_gitter_data.py @@ -1,4 +1,3 @@ - import argparse import os import tempfile diff --git a/zerver/management/commands/convert_slack_data.py b/zerver/management/commands/convert_slack_data.py index 2cde1e280b..1e9bdf8d87 100644 --- a/zerver/management/commands/convert_slack_data.py +++ b/zerver/management/commands/convert_slack_data.py @@ -1,4 +1,3 @@ - import argparse import os import tempfile diff --git a/zerver/management/commands/create_default_stream_groups.py b/zerver/management/commands/create_default_stream_groups.py index 94ba98b2c0..be0f2e163f 100644 --- a/zerver/management/commands/create_default_stream_groups.py +++ b/zerver/management/commands/create_default_stream_groups.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/deactivate_realm.py b/zerver/management/commands/deactivate_realm.py index 48bddf7525..480fa5061d 100644 --- a/zerver/management/commands/deactivate_realm.py +++ b/zerver/management/commands/deactivate_realm.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/deactivate_user.py b/zerver/management/commands/deactivate_user.py index 5314be24b4..cc7e198df1 100644 --- a/zerver/management/commands/deactivate_user.py +++ b/zerver/management/commands/deactivate_user.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/delete_old_unclaimed_attachments.py b/zerver/management/commands/delete_old_unclaimed_attachments.py index 49f8e637ad..42f8330910 100644 --- a/zerver/management/commands/delete_old_unclaimed_attachments.py +++ b/zerver/management/commands/delete_old_unclaimed_attachments.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/deliver_email.py b/zerver/management/commands/deliver_email.py index f3be083148..595b4b911b 100644 --- a/zerver/management/commands/deliver_email.py +++ b/zerver/management/commands/deliver_email.py @@ -1,4 +1,3 @@ - """\ Deliver email messages that have been queued by various things (at this time invitation reminders and day1/day2 followup emails). diff --git a/zerver/management/commands/dump_messages.py b/zerver/management/commands/dump_messages.py index cb4f5fab0d..5c4518a4ab 100644 --- a/zerver/management/commands/dump_messages.py +++ b/zerver/management/commands/dump_messages.py @@ -1,4 +1,3 @@ - import datetime import time from typing import Any diff --git a/zerver/management/commands/email_mirror.py b/zerver/management/commands/email_mirror.py index d114ed52ad..b6f9f153b6 100644 --- a/zerver/management/commands/email_mirror.py +++ b/zerver/management/commands/email_mirror.py @@ -1,4 +1,3 @@ - """ Forward messages sent to the configured email gateway to Zulip. diff --git a/zerver/management/commands/enqueue_file.py b/zerver/management/commands/enqueue_file.py index 199c3e53d7..e0ebc8dd0e 100644 --- a/zerver/management/commands/enqueue_file.py +++ b/zerver/management/commands/enqueue_file.py @@ -1,4 +1,3 @@ - import sys from argparse import ArgumentParser from typing import IO, Any diff --git a/zerver/management/commands/export.py b/zerver/management/commands/export.py index 408fd72c78..b41da4e2d7 100644 --- a/zerver/management/commands/export.py +++ b/zerver/management/commands/export.py @@ -1,4 +1,3 @@ - import os import tempfile import shutil diff --git a/zerver/management/commands/export_single_user.py b/zerver/management/commands/export_single_user.py index 149613fbce..a5ad13ee86 100644 --- a/zerver/management/commands/export_single_user.py +++ b/zerver/management/commands/export_single_user.py @@ -1,4 +1,3 @@ - import os import shutil import subprocess diff --git a/zerver/management/commands/export_usermessage_batch.py b/zerver/management/commands/export_usermessage_batch.py index ff82622253..5fadb8da54 100644 --- a/zerver/management/commands/export_usermessage_batch.py +++ b/zerver/management/commands/export_usermessage_batch.py @@ -1,4 +1,3 @@ - import glob import logging import os diff --git a/zerver/management/commands/fill_memcached_caches.py b/zerver/management/commands/fill_memcached_caches.py index b4e9255e52..7bcc7deef5 100644 --- a/zerver/management/commands/fill_memcached_caches.py +++ b/zerver/management/commands/fill_memcached_caches.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any, Optional diff --git a/zerver/management/commands/fix_unreads.py b/zerver/management/commands/fix_unreads.py index ab6d86da18..6f66ab8e2c 100644 --- a/zerver/management/commands/fix_unreads.py +++ b/zerver/management/commands/fix_unreads.py @@ -1,4 +1,3 @@ - import logging from argparse import ArgumentParser from typing import Any, List, Optional diff --git a/zerver/management/commands/generate_invite_links.py b/zerver/management/commands/generate_invite_links.py index 03a6ec760b..bf5e79da5d 100644 --- a/zerver/management/commands/generate_invite_links.py +++ b/zerver/management/commands/generate_invite_links.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/generate_multiuse_invite_link.py b/zerver/management/commands/generate_multiuse_invite_link.py index 9d3e27b408..67616cae27 100644 --- a/zerver/management/commands/generate_multiuse_invite_link.py +++ b/zerver/management/commands/generate_multiuse_invite_link.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any, List diff --git a/zerver/management/commands/generate_realm_creation_link.py b/zerver/management/commands/generate_realm_creation_link.py index e97cc196c6..dc72eb25e3 100644 --- a/zerver/management/commands/generate_realm_creation_link.py +++ b/zerver/management/commands/generate_realm_creation_link.py @@ -1,4 +1,3 @@ - from typing import Any from django.db import ProgrammingError diff --git a/zerver/management/commands/import.py b/zerver/management/commands/import.py index f2e2753788..af4f275436 100644 --- a/zerver/management/commands/import.py +++ b/zerver/management/commands/import.py @@ -1,4 +1,3 @@ - import argparse import os import subprocess diff --git a/zerver/management/commands/initialize_voyager_db.py b/zerver/management/commands/initialize_voyager_db.py index 0f1c7fb412..0e7d8ff2b3 100644 --- a/zerver/management/commands/initialize_voyager_db.py +++ b/zerver/management/commands/initialize_voyager_db.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any, Iterable, Tuple, Optional diff --git a/zerver/management/commands/knight.py b/zerver/management/commands/knight.py index 9b4bb7ca7e..2be6d10990 100644 --- a/zerver/management/commands/knight.py +++ b/zerver/management/commands/knight.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/list_realms.py b/zerver/management/commands/list_realms.py index 271dd28ca1..03ceefc04e 100644 --- a/zerver/management/commands/list_realms.py +++ b/zerver/management/commands/list_realms.py @@ -1,4 +1,3 @@ - import sys from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/logout_all_users.py b/zerver/management/commands/logout_all_users.py index 652be38178..22f80a3719 100644 --- a/zerver/management/commands/logout_all_users.py +++ b/zerver/management/commands/logout_all_users.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/merge_streams.py b/zerver/management/commands/merge_streams.py index bcf8dc68cd..69e895ea93 100644 --- a/zerver/management/commands/merge_streams.py +++ b/zerver/management/commands/merge_streams.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any, List diff --git a/zerver/management/commands/print_email_delivery_backlog.py b/zerver/management/commands/print_email_delivery_backlog.py index 2424c784fd..f58de5b1ae 100644 --- a/zerver/management/commands/print_email_delivery_backlog.py +++ b/zerver/management/commands/print_email_delivery_backlog.py @@ -1,4 +1,3 @@ - """ Shows backlog count of ScheduledEmail """ diff --git a/zerver/management/commands/process_queue.py b/zerver/management/commands/process_queue.py index c6d15555c4..2fe419ae4e 100644 --- a/zerver/management/commands/process_queue.py +++ b/zerver/management/commands/process_queue.py @@ -1,4 +1,3 @@ - import logging import signal import sys diff --git a/zerver/management/commands/purge_queue.py b/zerver/management/commands/purge_queue.py index 582953e640..edc596b4c4 100644 --- a/zerver/management/commands/purge_queue.py +++ b/zerver/management/commands/purge_queue.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/query_ldap.py b/zerver/management/commands/query_ldap.py index 28555ee274..358117391e 100644 --- a/zerver/management/commands/query_ldap.py +++ b/zerver/management/commands/query_ldap.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/rate_limit.py b/zerver/management/commands/rate_limit.py index 35062244bb..09de510cf3 100644 --- a/zerver/management/commands/rate_limit.py +++ b/zerver/management/commands/rate_limit.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/reactivate_realm.py b/zerver/management/commands/reactivate_realm.py index dc0e871657..67a731747b 100644 --- a/zerver/management/commands/reactivate_realm.py +++ b/zerver/management/commands/reactivate_realm.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/realm_domain.py b/zerver/management/commands/realm_domain.py index f82d84c843..040aaf24ff 100644 --- a/zerver/management/commands/realm_domain.py +++ b/zerver/management/commands/realm_domain.py @@ -1,4 +1,3 @@ - import sys from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/realm_filters.py b/zerver/management/commands/realm_filters.py index 84eb3d16ba..c259ccb5fb 100644 --- a/zerver/management/commands/realm_filters.py +++ b/zerver/management/commands/realm_filters.py @@ -1,4 +1,3 @@ - import sys from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/remove_users_from_stream.py b/zerver/management/commands/remove_users_from_stream.py index 4f47c773b0..bd21e00660 100644 --- a/zerver/management/commands/remove_users_from_stream.py +++ b/zerver/management/commands/remove_users_from_stream.py @@ -1,4 +1,3 @@ - from typing import Any from django.core.management.base import CommandParser diff --git a/zerver/management/commands/runtornado.py b/zerver/management/commands/runtornado.py index 0c97d3ba7f..fb241a2d2b 100644 --- a/zerver/management/commands/runtornado.py +++ b/zerver/management/commands/runtornado.py @@ -1,4 +1,3 @@ - import logging import sys from typing import Any, Callable diff --git a/zerver/management/commands/scrub_realm.py b/zerver/management/commands/scrub_realm.py index c6e5aac7e7..7d4d24f235 100644 --- a/zerver/management/commands/scrub_realm.py +++ b/zerver/management/commands/scrub_realm.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/send_realm_reactivation_email.py b/zerver/management/commands/send_realm_reactivation_email.py index 175b196526..637df538a3 100644 --- a/zerver/management/commands/send_realm_reactivation_email.py +++ b/zerver/management/commands/send_realm_reactivation_email.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from zerver.lib.management import ZulipBaseCommand, CommandError diff --git a/zerver/management/commands/send_stats.py b/zerver/management/commands/send_stats.py index 3305480a0c..1484ded486 100644 --- a/zerver/management/commands/send_stats.py +++ b/zerver/management/commands/send_stats.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any diff --git a/zerver/management/commands/send_test_email.py b/zerver/management/commands/send_test_email.py index ee6ce25268..996616093d 100644 --- a/zerver/management/commands/send_test_email.py +++ b/zerver/management/commands/send_test_email.py @@ -1,4 +1,3 @@ - from typing import Any from django.conf import settings diff --git a/zerver/management/commands/send_to_email_mirror.py b/zerver/management/commands/send_to_email_mirror.py index 391443a005..97900eaed8 100644 --- a/zerver/management/commands/send_to_email_mirror.py +++ b/zerver/management/commands/send_to_email_mirror.py @@ -1,4 +1,3 @@ - import os import email import ujson diff --git a/zerver/management/commands/set_message_flags.py b/zerver/management/commands/set_message_flags.py index fd8913f863..7a6893c104 100644 --- a/zerver/management/commands/set_message_flags.py +++ b/zerver/management/commands/set_message_flags.py @@ -1,4 +1,3 @@ - import logging import sys from typing import Any, Iterable diff --git a/zerver/management/commands/show_unreads.py b/zerver/management/commands/show_unreads.py index 402f5d395d..304d07216e 100644 --- a/zerver/management/commands/show_unreads.py +++ b/zerver/management/commands/show_unreads.py @@ -1,4 +1,3 @@ - from argparse import ArgumentParser from typing import Any, Dict, List, Set diff --git a/zerver/management/commands/sync_ldap_user_data.py b/zerver/management/commands/sync_ldap_user_data.py index 4438470000..7155ecd947 100644 --- a/zerver/management/commands/sync_ldap_user_data.py +++ b/zerver/management/commands/sync_ldap_user_data.py @@ -1,4 +1,3 @@ - import logging from argparse import ArgumentParser diff --git a/zerver/management/commands/turn_off_digests.py b/zerver/management/commands/turn_off_digests.py index 4c4f61fc08..4c3b97c089 100644 --- a/zerver/management/commands/turn_off_digests.py +++ b/zerver/management/commands/turn_off_digests.py @@ -1,4 +1,3 @@ - from django.core.management.base import CommandParser from zerver.lib.actions import do_change_notification_settings diff --git a/zerver/tests/test_audit_log.py b/zerver/tests/test_audit_log.py index a745851a75..0424ef707d 100644 --- a/zerver/tests/test_audit_log.py +++ b/zerver/tests/test_audit_log.py @@ -1,4 +1,3 @@ - from django.utils.timezone import now as timezone_now from zerver.lib.actions import do_create_user, do_deactivate_user, \ diff --git a/zerver/tests/test_bots.py b/zerver/tests/test_bots.py index f90dc53b91..d3e02b3f26 100644 --- a/zerver/tests/test_bots.py +++ b/zerver/tests/test_bots.py @@ -1,4 +1,3 @@ - import filecmp import os import ujson diff --git a/zerver/tests/test_compatibility.py b/zerver/tests/test_compatibility.py index 419fbe4fe5..0fe675d093 100644 --- a/zerver/tests/test_compatibility.py +++ b/zerver/tests/test_compatibility.py @@ -1,4 +1,3 @@ - from zerver.lib.test_classes import ZulipTestCase from zerver.views.compatibility import find_mobile_os, version_lt diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.py index cba66df963..20d3338f4f 100644 --- a/zerver/tests/test_push_notifications.py +++ b/zerver/tests/test_push_notifications.py @@ -1,4 +1,3 @@ - from contextlib import contextmanager import datetime import itertools diff --git a/zerver/tests/test_queue_worker.py b/zerver/tests/test_queue_worker.py index 80b6bdaaec..e4f77c8f66 100644 --- a/zerver/tests/test_queue_worker.py +++ b/zerver/tests/test_queue_worker.py @@ -1,4 +1,3 @@ - import os import time import ujson diff --git a/zerver/tests/test_settings.py b/zerver/tests/test_settings.py index 493eabdb8d..c2d8ebe933 100644 --- a/zerver/tests/test_settings.py +++ b/zerver/tests/test_settings.py @@ -1,4 +1,3 @@ - import ujson from django.http import HttpResponse diff --git a/zerver/tests/test_subdomains.py b/zerver/tests/test_subdomains.py index 47839239bd..0ef9c4438c 100644 --- a/zerver/tests/test_subdomains.py +++ b/zerver/tests/test_subdomains.py @@ -1,4 +1,3 @@ - import mock from typing import Any, Dict, List diff --git a/zerver/tests/test_timestamp.py b/zerver/tests/test_timestamp.py index 73c104dd34..243fb97b8e 100644 --- a/zerver/tests/test_timestamp.py +++ b/zerver/tests/test_timestamp.py @@ -1,4 +1,3 @@ - from django.utils.timezone import utc as timezone_utc from zerver.lib.test_classes import ZulipTestCase diff --git a/zerver/tests/test_type_debug.py b/zerver/tests/test_type_debug.py index 7b1fdb0a66..7c66fc11e3 100644 --- a/zerver/tests/test_type_debug.py +++ b/zerver/tests/test_type_debug.py @@ -1,4 +1,3 @@ - import sys from unittest import TestCase from io import StringIO diff --git a/zerver/tests/test_zephyr.py b/zerver/tests/test_zephyr.py index ec6abfb5dc..56ad78d1d7 100644 --- a/zerver/tests/test_zephyr.py +++ b/zerver/tests/test_zephyr.py @@ -1,4 +1,3 @@ - import ujson from django.http import HttpResponse diff --git a/zerver/tornado/application.py b/zerver/tornado/application.py index ec8fd3f5ff..0dc5ed48a8 100644 --- a/zerver/tornado/application.py +++ b/zerver/tornado/application.py @@ -1,4 +1,3 @@ - import atexit import tornado.web diff --git a/zerver/tornado/exceptions.py b/zerver/tornado/exceptions.py index b87d34b776..680343461c 100644 --- a/zerver/tornado/exceptions.py +++ b/zerver/tornado/exceptions.py @@ -1,4 +1,3 @@ - from django.utils.translation import ugettext as _ from zerver.lib.exceptions import ErrorCode, JsonableError diff --git a/zerver/tornado/handlers.py b/zerver/tornado/handlers.py index 0f636ff438..bd96feb23b 100644 --- a/zerver/tornado/handlers.py +++ b/zerver/tornado/handlers.py @@ -1,4 +1,3 @@ - import logging import sys import urllib diff --git a/zerver/tornado/views.py b/zerver/tornado/views.py index c4cbfea0d7..6bf2c6a8e6 100644 --- a/zerver/tornado/views.py +++ b/zerver/tornado/views.py @@ -1,4 +1,3 @@ - import time from typing import Iterable, List, Optional, Sequence, Union diff --git a/zerver/views/alert_words.py b/zerver/views/alert_words.py index c81087c55b..883b7e5d15 100644 --- a/zerver/views/alert_words.py +++ b/zerver/views/alert_words.py @@ -1,4 +1,3 @@ - from django.http import HttpResponse, HttpRequest from typing import List diff --git a/zerver/views/compatibility.py b/zerver/views/compatibility.py index 185b51c917..4d5f5d65db 100644 --- a/zerver/views/compatibility.py +++ b/zerver/views/compatibility.py @@ -1,4 +1,3 @@ - from django.http import HttpResponse, HttpRequest import re from typing import List, Optional, Tuple diff --git a/zerver/views/email_mirror.py b/zerver/views/email_mirror.py index 74cd275773..8e8260111c 100644 --- a/zerver/views/email_mirror.py +++ b/zerver/views/email_mirror.py @@ -1,4 +1,3 @@ - import ujson from django.http import HttpRequest, HttpResponse diff --git a/zerver/views/events_register.py b/zerver/views/events_register.py index 004380472f..92ba8a9c2c 100644 --- a/zerver/views/events_register.py +++ b/zerver/views/events_register.py @@ -1,4 +1,3 @@ - from django.http import HttpRequest, HttpResponse from typing import Dict, Iterable, Optional, Sequence diff --git a/zerver/views/muting.py b/zerver/views/muting.py index 904ea25d03..758866b60e 100644 --- a/zerver/views/muting.py +++ b/zerver/views/muting.py @@ -1,4 +1,3 @@ - from django.http import HttpResponse, HttpRequest from typing import Optional diff --git a/zerver/views/pointer.py b/zerver/views/pointer.py index 00a54b6d98..9b5b9ffcfd 100644 --- a/zerver/views/pointer.py +++ b/zerver/views/pointer.py @@ -1,4 +1,3 @@ - from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ diff --git a/zerver/views/presence.py b/zerver/views/presence.py index c000ea6348..89d2aab023 100644 --- a/zerver/views/presence.py +++ b/zerver/views/presence.py @@ -1,4 +1,3 @@ - import datetime import time diff --git a/zerver/views/tutorial.py b/zerver/views/tutorial.py index db035a2341..5b647af7f3 100644 --- a/zerver/views/tutorial.py +++ b/zerver/views/tutorial.py @@ -1,4 +1,3 @@ - from django.http import HttpRequest, HttpResponse from zerver.decorator import human_users_only diff --git a/zerver/views/typing.py b/zerver/views/typing.py index 43da3a140d..a09408815c 100644 --- a/zerver/views/typing.py +++ b/zerver/views/typing.py @@ -1,4 +1,3 @@ - from django.http import HttpRequest, HttpResponse from typing import List diff --git a/zerver/webhooks/homeassistant/tests.py b/zerver/webhooks/homeassistant/tests.py index 0d18ce448d..9e51690f86 100644 --- a/zerver/webhooks/homeassistant/tests.py +++ b/zerver/webhooks/homeassistant/tests.py @@ -1,4 +1,3 @@ - from zerver.lib.test_classes import WebhookTestCase class HomeAssistantHookTests(WebhookTestCase): diff --git a/zerver/webhooks/opbeat/fixtures/new_error.json b/zerver/webhooks/opbeat/fixtures/new_error.json index ab3b40246b..9047a44fb4 100644 --- a/zerver/webhooks/opbeat/fixtures/new_error.json +++ b/zerver/webhooks/opbeat/fixtures/new_error.json @@ -1,4 +1,3 @@ - { "id": "c0396f38323a4fa7b314f87d5ed9cdd2", "url": "https://opbeat.com/api/v2/organizations/f9a77c5e6b044c2686612539fe4a3a6f/activities/c0396f38323a4fa7b314f87d5ed9cdd2", diff --git a/zerver/webhooks/papertrail/tests.py b/zerver/webhooks/papertrail/tests.py index fe2162f15f..0c90655505 100644 --- a/zerver/webhooks/papertrail/tests.py +++ b/zerver/webhooks/papertrail/tests.py @@ -1,4 +1,3 @@ - from zerver.lib.test_classes import WebhookTestCase class PapertrailHookTests(WebhookTestCase): diff --git a/zilencer/management/commands/mark_all_messages_unread.py b/zilencer/management/commands/mark_all_messages_unread.py index 0946bae5c6..fe5f9da373 100644 --- a/zilencer/management/commands/mark_all_messages_unread.py +++ b/zilencer/management/commands/mark_all_messages_unread.py @@ -1,4 +1,3 @@ - from typing import Any from django.conf import settings diff --git a/zilencer/management/commands/migrate_stream_notifications.py b/zilencer/management/commands/migrate_stream_notifications.py index 32025cfa1a..ccde7ee936 100644 --- a/zilencer/management/commands/migrate_stream_notifications.py +++ b/zilencer/management/commands/migrate_stream_notifications.py @@ -1,4 +1,3 @@ - from typing import Any from django.core.management.base import BaseCommand diff --git a/zproject/jinja2/__init__.py b/zproject/jinja2/__init__.py index daba12f1e1..07b1fc6bfc 100644 --- a/zproject/jinja2/__init__.py +++ b/zproject/jinja2/__init__.py @@ -1,4 +1,3 @@ - from typing import Any from django.template.defaultfilters import slugify, pluralize