zulip/zerver/views
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
..
development scripts: Rename inline-email-css to inline_email_css.py. 2020-04-10 15:29:47 -07:00
__init__.py
alert_words.py alert words: Limit alert word length to 100. 2020-04-17 11:32:16 -07:00
archive.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
attachments.py uploads: Show used upload space in attachments UI. 2019-03-07 20:18:00 -08:00
auth.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
camo.py camo: Clean up type ignores. 2019-08-09 16:39:16 -07:00
compatibility.py version: Move minimum desktop version configuration to version.py. 2020-04-01 13:23:08 -07:00
custom_profile_fields.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
digest.py digest: Fix the styling of /digest page. 2019-01-07 13:09:29 -08:00
documentation.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
email_mirror.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
events_register.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
home.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
hotspots.py views: Fix imports of REQ/has_request_variables from the wrong place. 2017-10-27 15:07:31 -07:00
invite.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
messages.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
muting.py muting: Record DateTime when a Topic is muted. 2020-02-02 20:49:53 -08:00
pointer.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
portico.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
presence.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
push_notifications.py push_notifications: Declare token of type str, not bytes. 2019-11-12 23:21:20 -08:00
reactions.py text: Fix some typos (most of them found and fixed by codespell). 2020-03-27 17:25:56 -07:00
realm.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
realm_domains.py lint: Fix calls to _() on computed strings. 2019-04-23 15:23:03 -07:00
realm_emoji.py openapi: Fix handling of parameters passed via the URL/path. 2019-08-19 15:06:08 -07:00
realm_export.py billing: Change RealmAuditLog.event_type from str to int. 2019-10-06 15:55:56 -07:00
realm_filters.py views: Remove unused imports. 2019-02-02 17:23:43 -08:00
realm_icon.py redirects: Refactor redirect code to use central helper function. 2020-03-25 16:39:17 -07:00
realm_logo.py redirects: Refactor redirect code to use central helper function. 2020-03-25 16:39:17 -07:00
registration.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
report.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
storage.py views: Remove unused imports. 2019-02-02 17:23:43 -08:00
streams.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
submessage.py views: Remove unused imports. 2019-02-02 17:23:43 -08:00
thumbnail.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
tutorial.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
typing.py recipients: Rename extract_recipients to extract_private_recipients. 2020-02-11 12:28:14 -08:00
unsubscribe.py emails: Move clear_scheduled_*emails to send_email.py. 2019-03-15 11:02:17 -07:00
upload.py upload: Include filename at the end of temporary access URLs. 2020-04-20 10:25:48 -07:00
user_groups.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
user_settings.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
users.py python: Convert assignment type annotations to Python 3.6 style. 2020-04-22 11:02:32 -07:00
video_calls.py compose: Add support for using Zoom as the video chat provider. 2019-01-07 10:00:02 -08:00
zephyr.py zephyr: Add strict assertion about username format. 2020-03-17 05:37:25 -07:00