From 4bd28f7ae61712b5d05be3527780bec77b3f0c31 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 2 Feb 2019 14:53:20 -0800 Subject: [PATCH] migrations: Remove unused imports. Signed-off-by: Anders Kaseorg --- analytics/migrations/0002_remove_huddlecount.py | 2 +- .../migrations/0006_add_subgroup_to_unique_constraints.py | 2 +- analytics/migrations/0007_remove_interval.py | 1 - pgroonga/migrations/0001_enable.py | 3 +-- pgroonga/migrations/0002_html_escape_subject.py | 3 +-- pgroonga/migrations/0003_v2_api_upgrade.py | 3 +-- zerver/migrations/0036_rename_subdomain_to_string_id.py | 2 +- zerver/migrations/0040_realm_authentication_methods.py | 2 +- zerver/migrations/0060_move_avatars_to_be_uid_based.py | 4 ---- zerver/migrations/0064_sync_uploads_filesize_with_db.py | 2 -- zerver/migrations/0085_fix_bots_with_none_bot_type.py | 2 +- zerver/migrations/0093_subscription_event_log_backfill.py | 2 -- zerver/migrations/0097_reactions_emoji_code.py | 1 - zerver/migrations/0104_fix_unreads.py | 1 - zerver/migrations/0109_mark_tutorial_status_finished.py | 2 +- zerver/migrations/0110_stream_is_in_zephyr_realm.py | 2 +- zerver/migrations/0126_prereg_remove_users_without_realm.py | 2 +- .../0139_fill_last_message_id_in_subscription_logs.py | 2 +- zerver/migrations/0145_reactions_realm_emoji_name_to_id.py | 5 +---- zerver/migrations/0149_realm_emoji_drop_unique_constraint.py | 1 - .../migrations/0150_realm_allow_community_topic_editing.py | 2 -- zerver/migrations/0174_userprofile_delivery_email.py | 1 - .../0175_change_realm_audit_log_event_type_tense.py | 4 +--- .../0177_user_message_add_and_index_is_private_flag.py | 2 +- zerver/migrations/0182_set_initial_value_is_private_flag.py | 2 +- zerver/migrations/0185_realm_plan_type.py | 1 - zerver/migrations/0206_stream_rendered_description.py | 2 -- 27 files changed, 16 insertions(+), 42 deletions(-) diff --git a/analytics/migrations/0002_remove_huddlecount.py b/analytics/migrations/0002_remove_huddlecount.py index 69796ebf58..a13004a5c0 100644 --- a/analytics/migrations/0002_remove_huddlecount.py +++ b/analytics/migrations/0002_remove_huddlecount.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from django.db import migrations, models +from django.db import migrations class Migration(migrations.Migration): diff --git a/analytics/migrations/0006_add_subgroup_to_unique_constraints.py b/analytics/migrations/0006_add_subgroup_to_unique_constraints.py index eb41b4c3a5..98316b9b43 100644 --- a/analytics/migrations/0006_add_subgroup_to_unique_constraints.py +++ b/analytics/migrations/0006_add_subgroup_to_unique_constraints.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from django.db import migrations, models +from django.db import migrations class Migration(migrations.Migration): diff --git a/analytics/migrations/0007_remove_interval.py b/analytics/migrations/0007_remove_interval.py index 6b114e1527..9e7db43dae 100644 --- a/analytics/migrations/0007_remove_interval.py +++ b/analytics/migrations/0007_remove_interval.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-16 20:50 -from django.conf import settings from django.db import migrations class Migration(migrations.Migration): diff --git a/pgroonga/migrations/0001_enable.py b/pgroonga/migrations/0001_enable.py index bb9bec3283..ab427cf1c2 100644 --- a/pgroonga/migrations/0001_enable.py +++ b/pgroonga/migrations/0001_enable.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from django.db import models, migrations -from django.contrib.postgres import operations +from django.db import migrations from django.conf import settings diff --git a/pgroonga/migrations/0002_html_escape_subject.py b/pgroonga/migrations/0002_html_escape_subject.py index f5cb23bd55..cd23a89e67 100644 --- a/pgroonga/migrations/0002_html_escape_subject.py +++ b/pgroonga/migrations/0002_html_escape_subject.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from django.db import models, migrations, connection -from django.contrib.postgres import operations +from django.db import migrations, connection from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from zerver.lib.migrate import do_batch_update diff --git a/pgroonga/migrations/0003_v2_api_upgrade.py b/pgroonga/migrations/0003_v2_api_upgrade.py index 476e568eec..ea5066d224 100644 --- a/pgroonga/migrations/0003_v2_api_upgrade.py +++ b/pgroonga/migrations/0003_v2_api_upgrade.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from django.db import models, migrations -from django.contrib.postgres import operations +from django.db import migrations from django.conf import settings diff --git a/zerver/migrations/0036_rename_subdomain_to_string_id.py b/zerver/migrations/0036_rename_subdomain_to_string_id.py index cc51e02228..b7c3a002a2 100644 --- a/zerver/migrations/0036_rename_subdomain_to_string_id.py +++ b/zerver/migrations/0036_rename_subdomain_to_string_id.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from django.db import migrations, models +from django.db import migrations class Migration(migrations.Migration): diff --git a/zerver/migrations/0040_realm_authentication_methods.py b/zerver/migrations/0040_realm_authentication_methods.py index e895e85718..3e453b16af 100644 --- a/zerver/migrations/0040_realm_authentication_methods.py +++ b/zerver/migrations/0040_realm_authentication_methods.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import bitfield.models -from django.db import migrations, models +from django.db import migrations class Migration(migrations.Migration): diff --git a/zerver/migrations/0060_move_avatars_to_be_uid_based.py b/zerver/migrations/0060_move_avatars_to_be_uid_based.py index 353553ac73..6e6d7d550e 100644 --- a/zerver/migrations/0060_move_avatars_to_be_uid_based.py +++ b/zerver/migrations/0060_move_avatars_to_be_uid_based.py @@ -4,12 +4,8 @@ import os from typing import Text -import requests -from boto.s3.bucket import Bucket from boto.s3.connection import S3Connection -from boto.s3.key import Key from django.conf import settings -from django.core.files.uploadedfile import SimpleUploadedFile from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0064_sync_uploads_filesize_with_db.py b/zerver/migrations/0064_sync_uploads_filesize_with_db.py index 0d3179b577..481ea1f6e8 100644 --- a/zerver/migrations/0064_sync_uploads_filesize_with_db.py +++ b/zerver/migrations/0064_sync_uploads_filesize_with_db.py @@ -4,9 +4,7 @@ import os from typing import Text -from boto.s3.bucket import Bucket from boto.s3.connection import S3Connection -from boto.s3.key import Key from django.conf import settings from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor diff --git a/zerver/migrations/0085_fix_bots_with_none_bot_type.py b/zerver/migrations/0085_fix_bots_with_none_bot_type.py index 37609f8493..af230f79e3 100644 --- a/zerver/migrations/0085_fix_bots_with_none_bot_type.py +++ b/zerver/migrations/0085_fix_bots_with_none_bot_type.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-20 10:31 -from django.db import migrations, models +from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0093_subscription_event_log_backfill.py b/zerver/migrations/0093_subscription_event_log_backfill.py index 317c6a0f5e..7bb27b98fd 100644 --- a/zerver/migrations/0093_subscription_event_log_backfill.py +++ b/zerver/migrations/0093_subscription_event_log_backfill.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -from typing import List - from django.db import migrations, models from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0097_reactions_emoji_code.py b/zerver/migrations/0097_reactions_emoji_code.py index 9192492cba..aa319d6efd 100644 --- a/zerver/migrations/0097_reactions_emoji_code.py +++ b/zerver/migrations/0097_reactions_emoji_code.py @@ -4,7 +4,6 @@ import os import ujson -from django.conf import settings from django.db import migrations, models from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0104_fix_unreads.py b/zerver/migrations/0104_fix_unreads.py index bb08b448e8..de6581cb6e 100644 --- a/zerver/migrations/0104_fix_unreads.py +++ b/zerver/migrations/0104_fix_unreads.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-30 00:26 -import ujson from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0109_mark_tutorial_status_finished.py b/zerver/migrations/0109_mark_tutorial_status_finished.py index ab6952c4c0..61e5a5ba4c 100644 --- a/zerver/migrations/0109_mark_tutorial_status_finished.py +++ b/zerver/migrations/0109_mark_tutorial_status_finished.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from django.db import migrations, models +from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0110_stream_is_in_zephyr_realm.py b/zerver/migrations/0110_stream_is_in_zephyr_realm.py index 3a2a4269ce..5c8f4d468e 100644 --- a/zerver/migrations/0110_stream_is_in_zephyr_realm.py +++ b/zerver/migrations/0110_stream_is_in_zephyr_realm.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-08 18:37 -from django.db import connection, migrations, models +from django.db import migrations, models from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0126_prereg_remove_users_without_realm.py b/zerver/migrations/0126_prereg_remove_users_without_realm.py index c1eba8640e..de62892eb6 100644 --- a/zerver/migrations/0126_prereg_remove_users_without_realm.py +++ b/zerver/migrations/0126_prereg_remove_users_without_realm.py @@ -2,7 +2,7 @@ # Generated by Django 1.11.6 on 2017-11-30 04:58 from __future__ import unicode_literals -from django.db import migrations, models +from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0139_fill_last_message_id_in_subscription_logs.py b/zerver/migrations/0139_fill_last_message_id_in_subscription_logs.py index 0fae9f9933..3af9990daf 100644 --- a/zerver/migrations/0139_fill_last_message_id_in_subscription_logs.py +++ b/zerver/migrations/0139_fill_last_message_id_in_subscription_logs.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import migrations, models +from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0145_reactions_realm_emoji_name_to_id.py b/zerver/migrations/0145_reactions_realm_emoji_name_to_id.py index 2e6500ff91..bd3efc75c4 100644 --- a/zerver/migrations/0145_reactions_realm_emoji_name_to_id.py +++ b/zerver/migrations/0145_reactions_realm_emoji_name_to_id.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- -import ujson - from collections import defaultdict -from django.conf import settings -from django.db import migrations, models +from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from typing import Any, Dict diff --git a/zerver/migrations/0149_realm_emoji_drop_unique_constraint.py b/zerver/migrations/0149_realm_emoji_drop_unique_constraint.py index 7e2f998bc2..0d0016dd99 100644 --- a/zerver/migrations/0149_realm_emoji_drop_unique_constraint.py +++ b/zerver/migrations/0149_realm_emoji_drop_unique_constraint.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import os import shutil -import tempfile from boto.s3.connection import S3Connection from django.conf import settings diff --git a/zerver/migrations/0150_realm_allow_community_topic_editing.py b/zerver/migrations/0150_realm_allow_community_topic_editing.py index 2ffff3fd45..1d9e4ad168 100644 --- a/zerver/migrations/0150_realm_allow_community_topic_editing.py +++ b/zerver/migrations/0150_realm_allow_community_topic_editing.py @@ -3,8 +3,6 @@ from __future__ import unicode_literals from django.db import migrations, models -from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor -from django.db.migrations.state import StateApps class Migration(migrations.Migration): diff --git a/zerver/migrations/0174_userprofile_delivery_email.py b/zerver/migrations/0174_userprofile_delivery_email.py index 088ab79e12..b3d4ec8ea0 100644 --- a/zerver/migrations/0174_userprofile_delivery_email.py +++ b/zerver/migrations/0174_userprofile_delivery_email.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals from django.db import migrations, models -from django.apps import apps from django.db.models import F from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor diff --git a/zerver/migrations/0175_change_realm_audit_log_event_type_tense.py b/zerver/migrations/0175_change_realm_audit_log_event_type_tense.py index 90c4d5722e..fe350b0048 100644 --- a/zerver/migrations/0175_change_realm_audit_log_event_type_tense.py +++ b/zerver/migrations/0175_change_realm_audit_log_event_type_tense.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import migrations, models -from django.apps import apps -from django.db.models import F +from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0177_user_message_add_and_index_is_private_flag.py b/zerver/migrations/0177_user_message_add_and_index_is_private_flag.py index 865f05af8f..89ea7f6c31 100644 --- a/zerver/migrations/0177_user_message_add_and_index_is_private_flag.py +++ b/zerver/migrations/0177_user_message_add_and_index_is_private_flag.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import sys import bitfield.models -from django.db import migrations, transaction +from django.db import migrations from zerver.lib.migrate import create_index_if_not_exist # nolint from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps diff --git a/zerver/migrations/0182_set_initial_value_is_private_flag.py b/zerver/migrations/0182_set_initial_value_is_private_flag.py index f838c0e3dc..98af207f06 100644 --- a/zerver/migrations/0182_set_initial_value_is_private_flag.py +++ b/zerver/migrations/0182_set_initial_value_is_private_flag.py @@ -2,7 +2,7 @@ import sys from django.db import migrations -from django.db import migrations, transaction +from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import F diff --git a/zerver/migrations/0185_realm_plan_type.py b/zerver/migrations/0185_realm_plan_type.py index 13701f70c3..989a8fcda1 100644 --- a/zerver/migrations/0185_realm_plan_type.py +++ b/zerver/migrations/0185_realm_plan_type.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals from django.db import migrations, models -import zerver.models class Migration(migrations.Migration): diff --git a/zerver/migrations/0206_stream_rendered_description.py b/zerver/migrations/0206_stream_rendered_description.py index c63805506a..b41d75fa56 100644 --- a/zerver/migrations/0206_stream_rendered_description.py +++ b/zerver/migrations/0206_stream_rendered_description.py @@ -2,8 +2,6 @@ from __future__ import unicode_literals from django.db import migrations, models -from django.apps import apps -from django.db.models import F from django.db.migrations.state import StateApps from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor