diff --git a/puppet/zulip_ops/files/zulip-ec2-configure-interfaces b/puppet/zulip_ops/files/zulip-ec2-configure-interfaces index 4f630828d9..9f813dcdc5 100755 --- a/puppet/zulip_ops/files/zulip-ec2-configure-interfaces +++ b/puppet/zulip_ops/files/zulip-ec2-configure-interfaces @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # # Copyright © 2013 Zulip, Inc. # @@ -42,7 +41,6 @@ interfaces. ''' -from __future__ import absolute_import import sys import logging import logging.handlers diff --git a/zerver/migrations/0273_migrate_old_bot_messages.py b/zerver/migrations/0273_migrate_old_bot_messages.py index 2d4be1ad0b..ef44361190 100644 --- a/zerver/migrations/0273_migrate_old_bot_messages.py +++ b/zerver/migrations/0273_migrate_old_bot_messages.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from django.conf import settings from django.db import migrations from django.db.backends.postgresql.schema import DatabaseSchemaEditor diff --git a/zerver/migrations/0276_alertword.py b/zerver/migrations/0276_alertword.py index 17498d0784..75d3eafb3c 100644 --- a/zerver/migrations/0276_alertword.py +++ b/zerver/migrations/0276_alertword.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from django.conf import settings from django.db import migrations, models import django.db.models.deletion diff --git a/zerver/migrations/0277_migrate_alert_word.py b/zerver/migrations/0277_migrate_alert_word.py index 2ed1d3422f..158e823aa5 100644 --- a/zerver/migrations/0277_migrate_alert_word.py +++ b/zerver/migrations/0277_migrate_alert_word.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - 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/tests/test_alert_words.py b/zerver/tests/test_alert_words.py index 929a3cc4d4..3b19e4abae 100644 --- a/zerver/tests/test_alert_words.py +++ b/zerver/tests/test_alert_words.py @@ -66,14 +66,14 @@ class AlertWordTests(ZulipTestCase): self.assert_length(realm_alert_words[user.id], 3) # Test the case-insensitivity of adding words - do_add_alert_words(user, set(["ALert", "ALERT"])) + do_add_alert_words(user, {"ALert", "ALERT"}) words = user_alert_words(user) self.assertEqual(set(words), set(self.interesting_alert_word_list)) realm_alert_words = alert_words_in_realm(user.realm) self.assert_length(realm_alert_words[user.id], 3) # Test the case-insensitivity of removing words - do_remove_alert_words(user, set(["ALert"])) + do_remove_alert_words(user, {"ALert"}) words = user_alert_words(user) self.assertEqual(set(words), set(self.interesting_alert_word_list) - {'alert'}) realm_alert_words = alert_words_in_realm(user.realm) diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py index 0c1ae24197..e2b771a5a5 100644 --- a/zerver/tests/test_auth_backends.py +++ b/zerver/tests/test_auth_backends.py @@ -2840,8 +2840,8 @@ class ExternalMethodDictsTests(ZulipTestCase): external_auth_methods = get_external_method_dicts(get_realm("zephyr")) # Both idps enabled for the zephyr realm, + github auth. self.assert_length(external_auth_methods, 3) - self.assertEqual(set([external_auth_methods[0]['name'], external_auth_methods[1]['name']]), - set(['saml:test_idp', 'saml:test_idp2'])) + self.assertEqual({external_auth_methods[0]['name'], external_auth_methods[1]['name']}, + {'saml:test_idp', 'saml:test_idp2'}) class FetchAuthBackends(ZulipTestCase): def assert_on_error(self, error: Optional[str]) -> None: