zulip/zilencer/management/commands
Anders Kaseorg fead14951c python: Convert assignment type annotations to Python 3.6 style.
This commit was split by tabbott; this piece covers the vast majority
of files in Zulip, but excludes scripts/, tools/, and puppet/ to help
ensure we at least show the right error messages for Xenial systems.

We can likely further refine the remaining pieces with some testing.

Generated by com2ann, with whitespace fixes and various manual fixes
for runtime issues:

-    invoiced_through: Optional[LicenseLedger] = models.ForeignKey(
+    invoiced_through: Optional["LicenseLedger"] = models.ForeignKey(

-_apns_client: Optional[APNsClient] = None
+_apns_client: Optional["APNsClient"] = None

-    notifications_stream: Optional[Stream] = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE)
-    signup_notifications_stream: Optional[Stream] = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE)
+    notifications_stream: Optional["Stream"] = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE)
+    signup_notifications_stream: Optional["Stream"] = models.ForeignKey('Stream', related_name='+', null=True, blank=True, on_delete=CASCADE)

-    author: Optional[UserProfile] = models.ForeignKey('UserProfile', blank=True, null=True, on_delete=CASCADE)
+    author: Optional["UserProfile"] = models.ForeignKey('UserProfile', blank=True, null=True, on_delete=CASCADE)

-    bot_owner: Optional[UserProfile] = models.ForeignKey('self', null=True, on_delete=models.SET_NULL)
+    bot_owner: Optional["UserProfile"] = models.ForeignKey('self', null=True, on_delete=models.SET_NULL)

-    default_sending_stream: Optional[Stream] = models.ForeignKey('zerver.Stream', null=True, related_name='+', on_delete=CASCADE)
-    default_events_register_stream: Optional[Stream] = models.ForeignKey('zerver.Stream', null=True, related_name='+', on_delete=CASCADE)
+    default_sending_stream: Optional["Stream"] = models.ForeignKey('zerver.Stream', null=True, related_name='+', on_delete=CASCADE)
+    default_events_register_stream: Optional["Stream"] = models.ForeignKey('zerver.Stream', null=True, related_name='+', on_delete=CASCADE)

-descriptors_by_handler_id: Dict[int, ClientDescriptor] = {}
+descriptors_by_handler_id: Dict[int, "ClientDescriptor"] = {}

-worker_classes: Dict[str, Type[QueueProcessingWorker]] = {}
-queues: Dict[str, Dict[str, Type[QueueProcessingWorker]]] = {}
+worker_classes: Dict[str, Type["QueueProcessingWorker"]] = {}
+queues: Dict[str, Dict[str, Type["QueueProcessingWorker"]]] = {}

-AUTH_LDAP_REVERSE_EMAIL_SEARCH: Optional[LDAPSearch] = None
+AUTH_LDAP_REVERSE_EMAIL_SEARCH: Optional["LDAPSearch"] = None

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-22 11:02:32 -07:00
..
__init__.py
add_mock_conversation.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
add_new_realm.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
add_new_user.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
add_remote_server.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
calculate_first_visible_message_id.py mypy: Enable strict-optional for calculate_first_visible_message_id. 2019-05-01 10:49:24 -07:00
compare_messages.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
invoice_plans.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
mark_all_messages_unread.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
migrate_stream_notifications.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
populate_db.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
print_initial_password.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
profile_request.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
render_messages.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
sync_api_key.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00