2017-09-22 18:30:18 +02:00
|
|
|
import os
|
2017-04-05 07:21:42 +02:00
|
|
|
|
2019-08-17 13:17:07 +02:00
|
|
|
from typing import Dict, List, Optional, Any, Tuple
|
2016-07-25 22:12:12 +02:00
|
|
|
from django.conf.urls import url
|
2019-07-17 01:52:30 +02:00
|
|
|
from django.contrib.staticfiles.storage import staticfiles_storage
|
2018-02-02 05:43:18 +01:00
|
|
|
from django.urls.resolvers import RegexPattern
|
2016-10-27 14:52:33 +02:00
|
|
|
from django.utils.module_loading import import_string
|
2017-07-05 22:07:46 +02:00
|
|
|
from django.utils.translation import ugettext as _
|
2019-07-17 02:29:08 +02:00
|
|
|
from zerver.lib.storage import static_path
|
2019-08-17 13:17:07 +02:00
|
|
|
from zerver.lib.types import Validator
|
2017-04-05 07:34:02 +02:00
|
|
|
|
2016-07-25 22:12:12 +02:00
|
|
|
|
2016-08-04 21:13:25 +02:00
|
|
|
"""This module declares all of the (documented) integrations available
|
|
|
|
in the Zulip server. The Integration class is used as part of
|
|
|
|
generating the documentation on the /integrations page, while the
|
|
|
|
WebhookIntegration class is also used to generate the URLs in
|
|
|
|
`zproject/urls.py` for webhook integrations.
|
|
|
|
|
|
|
|
To add a new non-webhook integration, add code to the INTEGRATIONS
|
|
|
|
dictionary below.
|
|
|
|
|
|
|
|
To add a new webhook integration, declare a WebhookIntegration in the
|
|
|
|
WEBHOOK_INTEGRATIONS list below (it will be automatically added to
|
|
|
|
INTEGRATIONS).
|
|
|
|
|
2017-07-05 22:07:46 +02:00
|
|
|
To add a new integration category, add to the CATEGORIES dict.
|
|
|
|
|
2016-08-04 21:13:25 +02:00
|
|
|
Over time, we expect this registry to grow additional convenience
|
|
|
|
features for writing and configuring integrations efficiently.
|
|
|
|
"""
|
2016-07-25 22:12:12 +02:00
|
|
|
|
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 01:09:50 +02:00
|
|
|
CATEGORIES: Dict[str, str] = {
|
2017-07-18 03:42:37 +02:00
|
|
|
'meta-integration': _('Integration frameworks'),
|
|
|
|
'continuous-integration': _('Continuous integration'),
|
|
|
|
'customer-support': _('Customer support'),
|
2017-07-06 22:04:22 +02:00
|
|
|
'deployment': _('Deployment'),
|
|
|
|
'communication': _('Communication'),
|
2017-07-07 00:20:49 +02:00
|
|
|
'financial': _('Financial'),
|
2017-07-06 22:04:22 +02:00
|
|
|
'hr': _('HR'),
|
|
|
|
'marketing': _('Marketing'),
|
|
|
|
'misc': _('Miscellaneous'),
|
2017-07-07 00:20:49 +02:00
|
|
|
'monitoring': _('Monitoring tools'),
|
2017-07-18 03:42:37 +02:00
|
|
|
'project-management': _('Project management'),
|
2017-07-06 22:04:22 +02:00
|
|
|
'productivity': _('Productivity'),
|
2017-07-18 03:42:37 +02:00
|
|
|
'version-control': _('Version control'),
|
2017-09-17 02:28:59 +02:00
|
|
|
'bots': _('Interactive bots'),
|
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 01:09:50 +02:00
|
|
|
}
|
2017-07-05 22:07:46 +02:00
|
|
|
|
2017-11-05 11:37:41 +01:00
|
|
|
class Integration:
|
2019-07-17 01:52:30 +02:00
|
|
|
DEFAULT_LOGO_STATIC_PATH_PNG = 'images/integrations/logos/{name}.png'
|
|
|
|
DEFAULT_LOGO_STATIC_PATH_SVG = 'images/integrations/logos/{name}.svg'
|
2020-04-20 20:06:52 +02:00
|
|
|
DEFAULT_BOT_AVATAR_PATH = 'images/integrations/bot_avatars/{name}.png'
|
2016-07-25 22:12:12 +02:00
|
|
|
|
2017-12-14 10:32:23 +01:00
|
|
|
def __init__(self, name: str, client_name: str, categories: List[str],
|
|
|
|
logo: Optional[str]=None, secondary_line_text: Optional[str]=None,
|
|
|
|
display_name: Optional[str]=None, doc: Optional[str]=None,
|
2020-04-24 19:26:38 +02:00
|
|
|
stream_name: Optional[str]=None, legacy: bool=False,
|
2020-04-24 19:43:17 +02:00
|
|
|
config_options: Optional[List[Tuple[str, str, Validator]]]=None) -> None:
|
2016-07-25 22:12:12 +02:00
|
|
|
self.name = name
|
|
|
|
self.client_name = client_name
|
|
|
|
self.secondary_line_text = secondary_line_text
|
2017-07-21 03:22:09 +02:00
|
|
|
self.legacy = legacy
|
2016-11-26 00:25:05 +01:00
|
|
|
self.doc = doc
|
2016-07-25 22:12:12 +02:00
|
|
|
|
2019-08-17 13:17:07 +02:00
|
|
|
# Note: Currently only incoming webhook type bots use this list for
|
|
|
|
# defining how the bot's BotConfigData should be. Embedded bots follow
|
|
|
|
# a different approach.
|
2020-04-24 19:43:17 +02:00
|
|
|
if config_options is None:
|
|
|
|
config_options = []
|
2019-08-17 13:17:07 +02:00
|
|
|
self.config_options = config_options
|
|
|
|
|
2017-07-05 22:07:46 +02:00
|
|
|
for category in categories:
|
|
|
|
if category not in CATEGORIES:
|
|
|
|
raise KeyError( # nocoverage
|
|
|
|
'INTEGRATIONS: ' + name + ' - category \'' +
|
|
|
|
category + '\' is not a key in CATEGORIES.'
|
|
|
|
)
|
|
|
|
self.categories = list(map((lambda c: CATEGORIES[c]), categories))
|
|
|
|
|
2016-07-25 22:12:12 +02:00
|
|
|
if logo is None:
|
2019-07-17 01:52:30 +02:00
|
|
|
self.logo_url = self.get_logo_url()
|
|
|
|
else:
|
|
|
|
self.logo_url = staticfiles_storage.url(logo)
|
2016-07-25 22:12:12 +02:00
|
|
|
|
|
|
|
if display_name is None:
|
|
|
|
display_name = name.title()
|
|
|
|
self.display_name = display_name
|
|
|
|
|
2017-06-12 23:25:30 +02:00
|
|
|
if stream_name is None:
|
|
|
|
stream_name = self.name
|
|
|
|
self.stream_name = stream_name
|
|
|
|
|
2017-11-05 11:15:10 +01:00
|
|
|
def is_enabled(self) -> bool:
|
2016-07-25 22:12:12 +02:00
|
|
|
return True
|
|
|
|
|
2020-04-21 15:10:56 +02:00
|
|
|
def get_logo_path(self) -> Optional[str]:
|
2019-07-17 01:52:30 +02:00
|
|
|
logo_file_path_svg = self.DEFAULT_LOGO_STATIC_PATH_SVG.format(name=self.name)
|
|
|
|
logo_file_path_png = self.DEFAULT_LOGO_STATIC_PATH_PNG.format(name=self.name)
|
2019-07-17 02:29:08 +02:00
|
|
|
if os.path.isfile(static_path(logo_file_path_svg)):
|
2020-04-21 15:10:56 +02:00
|
|
|
return logo_file_path_svg
|
2019-07-17 02:29:08 +02:00
|
|
|
elif os.path.isfile(static_path(logo_file_path_png)):
|
2020-04-21 15:10:56 +02:00
|
|
|
return logo_file_path_png
|
|
|
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
def get_logo_url(self) -> Optional[str]:
|
|
|
|
logo_path = self.get_logo_path()
|
|
|
|
if logo_path is not None:
|
|
|
|
return staticfiles_storage.url(logo_path)
|
2017-10-17 19:39:01 +02:00
|
|
|
|
|
|
|
return None
|
|
|
|
|
2017-09-17 02:28:59 +02:00
|
|
|
class BotIntegration(Integration):
|
2019-07-17 01:52:30 +02:00
|
|
|
DEFAULT_LOGO_STATIC_PATH_PNG = 'generated/bots/{name}/logo.png'
|
|
|
|
DEFAULT_LOGO_STATIC_PATH_SVG = 'generated/bots/{name}/logo.svg'
|
|
|
|
ZULIP_LOGO_STATIC_PATH_PNG = 'images/logo/zulip-icon-128x128.png'
|
2017-09-17 02:28:59 +02:00
|
|
|
DEFAULT_DOC_PATH = '{name}/doc.md'
|
|
|
|
|
2017-12-14 10:32:23 +01:00
|
|
|
def __init__(self, name: str, categories: List[str], logo: Optional[str]=None,
|
|
|
|
secondary_line_text: Optional[str]=None, display_name: Optional[str]=None,
|
|
|
|
doc: Optional[str]=None) -> None:
|
2017-10-27 08:28:23 +02:00
|
|
|
super().__init__(
|
2017-09-17 02:28:59 +02:00
|
|
|
name,
|
|
|
|
client_name=name,
|
|
|
|
categories=categories,
|
|
|
|
secondary_line_text=secondary_line_text,
|
|
|
|
)
|
|
|
|
|
|
|
|
if logo is None:
|
2019-07-17 01:52:30 +02:00
|
|
|
self.logo_url = self.get_logo_url()
|
|
|
|
if self.logo_url is None:
|
2017-09-17 02:28:59 +02:00
|
|
|
# TODO: Add a test for this by initializing one in a test.
|
2019-07-17 01:52:30 +02:00
|
|
|
logo = staticfiles_storage.url(self.ZULIP_LOGO_STATIC_PATH_PNG) # nocoverage
|
|
|
|
else:
|
|
|
|
self.logo_url = staticfiles_storage.url(logo)
|
2017-09-17 02:28:59 +02:00
|
|
|
|
|
|
|
if display_name is None:
|
|
|
|
display_name = "{} Bot".format(name.title()) # nocoverage
|
|
|
|
else:
|
|
|
|
display_name = "{} Bot".format(display_name)
|
|
|
|
self.display_name = display_name
|
|
|
|
|
|
|
|
if doc is None:
|
|
|
|
doc = self.DEFAULT_DOC_PATH.format(name=name)
|
|
|
|
self.doc = doc
|
|
|
|
|
2016-07-25 22:12:12 +02:00
|
|
|
class WebhookIntegration(Integration):
|
2016-11-23 20:15:23 +01:00
|
|
|
DEFAULT_FUNCTION_PATH = 'zerver.webhooks.{name}.view.api_{name}_webhook'
|
2016-07-25 22:12:12 +02:00
|
|
|
DEFAULT_URL = 'api/v1/external/{name}'
|
|
|
|
DEFAULT_CLIENT_NAME = 'Zulip{name}Webhook'
|
2017-04-05 07:34:02 +02:00
|
|
|
DEFAULT_DOC_PATH = '{name}/doc.{ext}'
|
2016-07-25 22:12:12 +02:00
|
|
|
|
2017-12-14 10:32:23 +01:00
|
|
|
def __init__(self, name: str, categories: List[str], client_name: Optional[str]=None,
|
|
|
|
logo: Optional[str]=None, secondary_line_text: Optional[str]=None,
|
|
|
|
function: Optional[str]=None, url: Optional[str]=None,
|
|
|
|
display_name: Optional[str]=None, doc: Optional[str]=None,
|
2020-04-24 19:26:38 +02:00
|
|
|
stream_name: Optional[str]=None, legacy: bool=False,
|
2020-04-24 19:43:17 +02:00
|
|
|
config_options: Optional[List[Tuple[str, str, Validator]]]=None) -> None:
|
2016-07-25 22:12:12 +02:00
|
|
|
if client_name is None:
|
|
|
|
client_name = self.DEFAULT_CLIENT_NAME.format(name=name.title())
|
2017-10-27 08:28:23 +02:00
|
|
|
super().__init__(
|
2017-06-13 16:08:07 +02:00
|
|
|
name,
|
|
|
|
client_name,
|
2017-07-05 22:07:46 +02:00
|
|
|
categories,
|
2017-06-13 16:08:07 +02:00
|
|
|
logo=logo,
|
|
|
|
secondary_line_text=secondary_line_text,
|
|
|
|
display_name=display_name,
|
2017-07-21 03:22:09 +02:00
|
|
|
stream_name=stream_name,
|
2019-08-17 13:17:07 +02:00
|
|
|
legacy=legacy,
|
|
|
|
config_options=config_options
|
2017-06-13 16:08:07 +02:00
|
|
|
)
|
2016-07-25 22:12:12 +02:00
|
|
|
|
|
|
|
if function is None:
|
|
|
|
function = self.DEFAULT_FUNCTION_PATH.format(name=name)
|
2016-10-27 14:52:33 +02:00
|
|
|
|
|
|
|
if isinstance(function, str):
|
|
|
|
function = import_string(function)
|
|
|
|
|
2016-07-25 22:12:12 +02:00
|
|
|
self.function = function
|
|
|
|
|
|
|
|
if url is None:
|
|
|
|
url = self.DEFAULT_URL.format(name=name)
|
|
|
|
self.url = url
|
|
|
|
|
2016-11-26 00:25:05 +01:00
|
|
|
if doc is None:
|
2017-06-15 21:32:53 +02:00
|
|
|
doc = self.DEFAULT_DOC_PATH.format(name=name, ext='md')
|
2017-04-05 07:34:02 +02:00
|
|
|
|
2016-11-26 00:25:05 +01:00
|
|
|
self.doc = doc
|
|
|
|
|
2016-07-25 22:12:12 +02:00
|
|
|
@property
|
2018-02-02 05:43:18 +01:00
|
|
|
def url_object(self) -> RegexPattern:
|
2016-07-25 22:12:12 +02:00
|
|
|
return url(self.url, self.function)
|
|
|
|
|
2020-04-09 19:33:49 +02:00
|
|
|
def split_fixture_path(path: str) -> Tuple[str, str]:
|
|
|
|
path, fixture_name = os.path.split(path)
|
|
|
|
fixture_name, _ = os.path.splitext(fixture_name)
|
|
|
|
integration_name = os.path.split(os.path.dirname(path))[-1]
|
|
|
|
return integration_name, fixture_name
|
|
|
|
|
2020-04-26 08:35:53 +02:00
|
|
|
# FIXME: Change to namedtuple if we drop Python3.6: No default values support on namedtuples (or dataclass)
|
|
|
|
class ScreenshotConfig:
|
|
|
|
def __init__(self, fixture_name: str, image_name: str='001.png', image_dir: Optional[str]=None):
|
|
|
|
self.fixture_name = fixture_name
|
|
|
|
self.image_name = image_name
|
|
|
|
self.image_dir = image_dir
|
|
|
|
|
|
|
|
def get_fixture_and_image_paths(integration: WebhookIntegration,
|
|
|
|
screenshot_config: ScreenshotConfig) -> Tuple[str, str]:
|
|
|
|
fixture_dir = os.path.join('zerver', 'webhooks', integration.name, 'fixtures')
|
|
|
|
fixture_path = os.path.join(fixture_dir, screenshot_config.fixture_name)
|
|
|
|
image_dir = screenshot_config.image_dir or integration.name
|
|
|
|
image_name = screenshot_config.image_name
|
|
|
|
image_path = os.path.join('static/images/integrations', image_dir, image_name)
|
|
|
|
return fixture_path, image_path
|
|
|
|
|
2017-11-15 23:01:12 +01:00
|
|
|
class HubotIntegration(Integration):
|
2016-11-23 18:58:59 +01:00
|
|
|
GIT_URL_TEMPLATE = "https://github.com/hubot-scripts/hubot-{}"
|
|
|
|
|
2017-11-10 03:34:13 +01:00
|
|
|
def __init__(self, name: str, categories: List[str],
|
|
|
|
display_name: Optional[str]=None, logo: Optional[str]=None,
|
|
|
|
logo_alt: Optional[str]=None, git_url: Optional[str]=None,
|
|
|
|
legacy: bool=False) -> None:
|
2016-11-23 18:58:59 +01:00
|
|
|
if logo_alt is None:
|
|
|
|
logo_alt = "{} logo".format(name.title())
|
|
|
|
self.logo_alt = logo_alt
|
|
|
|
|
|
|
|
if git_url is None:
|
|
|
|
git_url = self.GIT_URL_TEMPLATE.format(name)
|
2017-10-07 12:30:49 +02:00
|
|
|
self.hubot_docs_url = git_url
|
|
|
|
|
2017-10-27 08:28:23 +02:00
|
|
|
super().__init__(
|
2017-07-05 22:07:46 +02:00
|
|
|
name, name, categories,
|
2017-07-21 03:22:09 +02:00
|
|
|
logo=logo, display_name=display_name,
|
2017-11-20 03:27:04 +01:00
|
|
|
doc = 'zerver/integrations/hubot_common.md',
|
2017-07-21 03:22:09 +02:00
|
|
|
legacy=legacy
|
2017-06-13 16:08:07 +02:00
|
|
|
)
|
2016-11-23 18:58:59 +01:00
|
|
|
|
2017-07-21 17:52:56 +02:00
|
|
|
class EmbeddedBotIntegration(Integration):
|
|
|
|
'''
|
|
|
|
This class acts as a registry for bots verified as safe
|
|
|
|
and valid such that these are capable of being deployed on the server.
|
|
|
|
'''
|
|
|
|
DEFAULT_CLIENT_NAME = 'Zulip{name}EmbeddedBot'
|
|
|
|
|
2017-11-05 11:15:10 +01:00
|
|
|
def __init__(self, name: str, *args: Any, **kwargs: Any) -> None:
|
2017-07-21 17:52:56 +02:00
|
|
|
assert kwargs.get("client_name") is None
|
|
|
|
client_name = self.DEFAULT_CLIENT_NAME.format(name=name.title())
|
2017-10-27 08:28:23 +02:00
|
|
|
super().__init__(
|
2017-07-21 17:52:56 +02:00
|
|
|
name, client_name, *args, **kwargs)
|
|
|
|
|
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 01:09:50 +02:00
|
|
|
EMBEDDED_BOTS: List[EmbeddedBotIntegration] = [
|
2017-07-21 17:52:56 +02:00
|
|
|
EmbeddedBotIntegration('converter', []),
|
2017-10-20 18:51:27 +02:00
|
|
|
EmbeddedBotIntegration('encrypt', []),
|
2017-10-25 17:18:43 +02:00
|
|
|
EmbeddedBotIntegration('helloworld', []),
|
|
|
|
EmbeddedBotIntegration('virtual_fs', []),
|
2018-01-07 19:24:14 +01:00
|
|
|
EmbeddedBotIntegration('giphy', []),
|
|
|
|
EmbeddedBotIntegration('followup', []),
|
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 01:09:50 +02:00
|
|
|
]
|
2017-07-21 17:52:56 +02:00
|
|
|
|
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 01:09:50 +02:00
|
|
|
WEBHOOK_INTEGRATIONS: List[WebhookIntegration] = [
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('airbrake', ['monitoring']),
|
2020-02-07 10:04:22 +01:00
|
|
|
WebhookIntegration(
|
|
|
|
'alertmanager',
|
|
|
|
['monitoring'],
|
|
|
|
display_name='Prometheus AlertManager',
|
|
|
|
logo='images/integrations/logos/prometheus.svg'
|
|
|
|
),
|
2018-09-13 00:45:22 +02:00
|
|
|
WebhookIntegration('ansibletower', ['deployment'], display_name='Ansible Tower'),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('appfollow', ['customer-support'], display_name='AppFollow'),
|
2018-09-10 19:03:23 +02:00
|
|
|
WebhookIntegration('appveyor', ['continuous-integration'], display_name='AppVeyor'),
|
2018-02-17 23:06:04 +01:00
|
|
|
WebhookIntegration('beanstalk', ['version-control'], stream_name='commits'),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('basecamp', ['project-management']),
|
2018-01-08 18:59:16 +01:00
|
|
|
WebhookIntegration('beeminder', ['misc'], display_name='Beeminder'),
|
2019-03-03 17:44:33 +01:00
|
|
|
WebhookIntegration(
|
|
|
|
'bitbucket3',
|
|
|
|
['version-control'],
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/bitbucket.svg',
|
2019-03-03 17:44:33 +01:00
|
|
|
display_name='Bitbucket Server',
|
|
|
|
stream_name='bitbucket'
|
|
|
|
),
|
2017-06-12 23:25:30 +02:00
|
|
|
WebhookIntegration(
|
|
|
|
'bitbucket2',
|
2017-07-18 03:42:37 +02:00
|
|
|
['version-control'],
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/bitbucket.svg',
|
2017-06-12 23:25:30 +02:00
|
|
|
display_name='Bitbucket',
|
|
|
|
stream_name='bitbucket'
|
|
|
|
),
|
2017-06-12 23:48:16 +02:00
|
|
|
WebhookIntegration(
|
|
|
|
'bitbucket',
|
2017-07-18 03:42:37 +02:00
|
|
|
['version-control'],
|
2017-06-12 23:48:16 +02:00
|
|
|
display_name='Bitbucket',
|
|
|
|
secondary_line_text='(Enterprise)',
|
2017-07-21 03:22:09 +02:00
|
|
|
stream_name='commits',
|
|
|
|
legacy=True
|
2017-06-12 23:48:16 +02:00
|
|
|
),
|
2019-03-30 23:04:52 +01:00
|
|
|
WebhookIntegration('buildbot', ['continuous-integration'], display_name='Buildbot'),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('circleci', ['continuous-integration'], display_name='CircleCI'),
|
2018-06-19 01:54:57 +02:00
|
|
|
WebhookIntegration('clubhouse', ['project-management']),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('codeship', ['continuous-integration', 'deployment']),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('crashlytics', ['monitoring']),
|
2018-01-12 13:49:11 +01:00
|
|
|
WebhookIntegration('dialogflow', ['customer-support'], display_name='Dialogflow'),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('delighted', ['customer-support', 'marketing'], display_name='Delighted'),
|
2017-06-13 00:34:47 +02:00
|
|
|
WebhookIntegration(
|
|
|
|
'deskdotcom',
|
2017-07-18 03:42:37 +02:00
|
|
|
['customer-support'],
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/deskcom.png',
|
2017-06-13 00:34:47 +02:00
|
|
|
display_name='Desk.com',
|
|
|
|
stream_name='desk'
|
|
|
|
),
|
2017-12-18 01:56:03 +01:00
|
|
|
WebhookIntegration('dropbox', ['productivity'], display_name='Dropbox'),
|
2020-01-16 08:01:39 +01:00
|
|
|
WebhookIntegration('errbit', ['monitoring'], display_name='Errbit'),
|
2018-03-01 12:13:15 +01:00
|
|
|
WebhookIntegration('flock', ['customer-support'], display_name='Flock'),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('freshdesk', ['customer-support']),
|
2018-02-08 19:46:15 +01:00
|
|
|
WebhookIntegration('front', ['customer-support'], display_name='Front'),
|
2019-11-18 03:28:15 +01:00
|
|
|
WebhookIntegration('gitea', ['version-control'], stream_name='commits'),
|
2019-04-26 01:16:38 +02:00
|
|
|
WebhookIntegration(
|
2018-04-18 21:34:30 +02:00
|
|
|
'github',
|
2017-07-18 03:42:37 +02:00
|
|
|
['version-control'],
|
2016-10-25 14:50:42 +02:00
|
|
|
display_name='GitHub',
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/github.svg',
|
2018-04-18 21:34:30 +02:00
|
|
|
function='zerver.webhooks.github.view.api_github_webhook',
|
2017-06-12 23:54:45 +02:00
|
|
|
stream_name='github'
|
2016-10-25 14:50:42 +02:00
|
|
|
),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('gitlab', ['version-control'], display_name='GitLab'),
|
2018-01-28 18:09:08 +01:00
|
|
|
WebhookIntegration('gocd', ['continuous-integration'], display_name='GoCD'),
|
2018-03-07 22:26:10 +01:00
|
|
|
WebhookIntegration('gogs', ['version-control'], stream_name='commits'),
|
2017-07-07 00:28:43 +02:00
|
|
|
WebhookIntegration('gosquared', ['marketing'], display_name='GoSquared'),
|
2020-04-15 06:06:49 +02:00
|
|
|
WebhookIntegration('grafana', ['monitoring'], display_name='Grafana'),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('greenhouse', ['hr'], display_name='Greenhouse'),
|
2018-01-07 12:05:44 +01:00
|
|
|
WebhookIntegration('groove', ['customer-support'], display_name='Groove'),
|
2019-10-20 02:12:00 +02:00
|
|
|
WebhookIntegration('harbor', ['deployment', 'productivity'], display_name='Harbor'),
|
2017-07-07 00:20:49 +02:00
|
|
|
WebhookIntegration('hellosign', ['productivity', 'hr'], display_name='HelloSign'),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('helloworld', ['misc'], display_name='Hello World'),
|
|
|
|
WebhookIntegration('heroku', ['deployment'], display_name='Heroku'),
|
|
|
|
WebhookIntegration('homeassistant', ['misc'], display_name='Home Assistant'),
|
2017-07-05 22:07:46 +02:00
|
|
|
WebhookIntegration(
|
|
|
|
'ifttt',
|
2017-07-18 03:42:37 +02:00
|
|
|
['meta-integration'],
|
2017-07-05 22:07:46 +02:00
|
|
|
function='zerver.webhooks.ifttt.view.api_iftt_app_webhook',
|
|
|
|
display_name='IFTTT'
|
|
|
|
),
|
2018-01-29 11:33:21 +01:00
|
|
|
WebhookIntegration('insping', ['monitoring'], display_name='Insping'),
|
2018-01-06 12:11:44 +01:00
|
|
|
WebhookIntegration('intercom', ['customer-support'], display_name='Intercom'),
|
2017-08-01 02:01:03 +02:00
|
|
|
WebhookIntegration('jira', ['project-management'], display_name='JIRA'),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('librato', ['monitoring']),
|
|
|
|
WebhookIntegration('mention', ['marketing'], display_name='Mention'),
|
2018-08-18 18:46:01 +02:00
|
|
|
WebhookIntegration('netlify', ['continuous-integration', 'deployment'], display_name='Netlify'),
|
2017-07-07 00:28:43 +02:00
|
|
|
WebhookIntegration('newrelic', ['monitoring'], display_name='New Relic'),
|
2018-01-15 17:50:12 +01:00
|
|
|
WebhookIntegration(
|
|
|
|
'opbeat',
|
|
|
|
['monitoring'],
|
|
|
|
display_name='Opbeat',
|
|
|
|
stream_name='opbeat',
|
|
|
|
function='zerver.webhooks.opbeat.view.api_opbeat_webhook'
|
|
|
|
),
|
2019-02-17 20:29:33 +01:00
|
|
|
WebhookIntegration('opsgenie', ['meta-integration', 'monitoring']),
|
2018-05-30 02:40:28 +02:00
|
|
|
WebhookIntegration('pagerduty', ['monitoring'], display_name='PagerDuty'),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('papertrail', ['monitoring']),
|
|
|
|
WebhookIntegration('pingdom', ['monitoring']),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('pivotal', ['project-management'], display_name='Pivotal Tracker'),
|
2018-01-06 16:48:01 +01:00
|
|
|
WebhookIntegration('raygun', ['monitoring'], display_name="Raygun"),
|
2018-11-01 20:56:22 +01:00
|
|
|
WebhookIntegration('reviewboard', ['version-control'], display_name="ReviewBoard"),
|
2020-03-14 13:12:03 +01:00
|
|
|
WebhookIntegration('semaphore', ['continuous-integration', 'deployment']),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('sentry', ['monitoring']),
|
2020-02-12 23:48:55 +01:00
|
|
|
WebhookIntegration(
|
|
|
|
'slack_incoming',
|
2020-05-09 20:22:11 +02:00
|
|
|
['communication', 'meta-integration'],
|
2020-02-12 23:48:55 +01:00
|
|
|
display_name="Slack-compatible webhook",
|
|
|
|
logo='images/integrations/logos/slack.svg',
|
|
|
|
),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('slack', ['communication']),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('solano', ['continuous-integration'], display_name='Solano Labs'),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('splunk', ['monitoring'], display_name='Splunk'),
|
2017-12-27 07:15:27 +01:00
|
|
|
WebhookIntegration('statuspage', ['customer-support'], display_name='Statuspage'),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('stripe', ['financial'], display_name='Stripe'),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('taiga', ['project-management']),
|
|
|
|
WebhookIntegration('teamcity', ['continuous-integration']),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('transifex', ['misc']),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('travis', ['continuous-integration'], display_name='Travis CI'),
|
2017-08-01 02:01:03 +02:00
|
|
|
WebhookIntegration('trello', ['project-management']),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('updown', ['monitoring']),
|
2016-07-25 22:12:12 +02:00
|
|
|
WebhookIntegration(
|
|
|
|
'yo',
|
2017-07-06 22:04:22 +02:00
|
|
|
['communication'],
|
2016-11-23 20:15:23 +01:00
|
|
|
function='zerver.webhooks.yo.view.api_yo_app_webhook',
|
2016-07-25 22:12:12 +02:00
|
|
|
display_name='Yo App'
|
|
|
|
),
|
2017-07-06 22:04:22 +02:00
|
|
|
WebhookIntegration('wordpress', ['marketing'], display_name='WordPress'),
|
2017-07-18 03:42:37 +02:00
|
|
|
WebhookIntegration('zapier', ['meta-integration']),
|
2017-10-09 16:54:32 +02:00
|
|
|
WebhookIntegration('zendesk', ['customer-support']),
|
2018-06-04 22:34:26 +02:00
|
|
|
WebhookIntegration('zabbix', ['monitoring'], display_name='Zabbix'),
|
2017-10-09 16:54:32 +02:00
|
|
|
WebhookIntegration('gci', ['misc'], display_name='Google Code-in',
|
2018-01-08 07:33:06 +01:00
|
|
|
stream_name='gci'),
|
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 01:09:50 +02:00
|
|
|
]
|
2016-07-25 22:12:12 +02:00
|
|
|
|
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 01:09:50 +02:00
|
|
|
INTEGRATIONS: Dict[str, Integration] = {
|
2017-07-18 03:42:37 +02:00
|
|
|
'asana': Integration('asana', 'asana', ['project-management'], doc='zerver/integrations/asana.md'),
|
2017-07-05 22:07:46 +02:00
|
|
|
'capistrano': Integration(
|
|
|
|
'capistrano',
|
|
|
|
'capistrano',
|
2017-07-06 22:04:22 +02:00
|
|
|
['deployment'],
|
2017-07-05 22:07:46 +02:00
|
|
|
display_name='Capistrano',
|
|
|
|
doc='zerver/integrations/capistrano.md'
|
2017-06-22 03:08:11 +02:00
|
|
|
),
|
2017-07-18 03:42:37 +02:00
|
|
|
'codebase': Integration('codebase', 'codebase', ['version-control'],
|
2017-07-06 22:04:22 +02:00
|
|
|
doc='zerver/integrations/codebase.md'),
|
2017-08-23 13:53:15 +02:00
|
|
|
'discourse': Integration('discourse', 'discourse', ['communication'],
|
|
|
|
doc='zerver/integrations/discourse.md'),
|
2019-08-04 03:08:29 +02:00
|
|
|
'email': Integration('email', 'email', ['communication'],
|
|
|
|
doc='zerver/integrations/email.md'),
|
2017-11-10 03:34:13 +01:00
|
|
|
'errbot': Integration('errbot', 'errbot', ['meta-integration', 'bots'],
|
|
|
|
doc='zerver/integrations/errbot.md'),
|
2018-04-21 21:04:08 +02:00
|
|
|
'git': Integration('git', 'git', ['version-control'],
|
|
|
|
stream_name='commits', doc='zerver/integrations/git.md'),
|
2017-04-05 07:18:57 +02:00
|
|
|
'google-calendar': Integration(
|
|
|
|
'google-calendar',
|
|
|
|
'google-calendar',
|
2017-07-06 22:04:22 +02:00
|
|
|
['productivity'],
|
2017-04-05 07:18:57 +02:00
|
|
|
display_name='Google Calendar',
|
2017-06-05 22:10:18 +02:00
|
|
|
doc='zerver/integrations/google-calendar.md'
|
2017-04-05 07:18:57 +02:00
|
|
|
),
|
2017-09-26 05:06:39 +02:00
|
|
|
'hubot': Integration('hubot', 'hubot', ['meta-integration', 'bots'], doc='zerver/integrations/hubot.md'),
|
2018-06-12 03:27:37 +02:00
|
|
|
'irc': Integration('irc', 'irc', ['communication'], display_name='IRC',
|
2018-05-26 23:47:38 +02:00
|
|
|
doc='zerver/integrations/irc.md'),
|
2017-04-05 07:25:43 +02:00
|
|
|
'jenkins': Integration(
|
|
|
|
'jenkins',
|
|
|
|
'jenkins',
|
2017-07-18 03:42:37 +02:00
|
|
|
['continuous-integration'],
|
2017-04-05 07:25:43 +02:00
|
|
|
secondary_line_text='(or Hudson)',
|
2017-06-22 13:32:18 +02:00
|
|
|
doc='zerver/integrations/jenkins.md'
|
2017-04-05 07:25:43 +02:00
|
|
|
),
|
2016-07-25 22:12:12 +02:00
|
|
|
'jira-plugin': Integration(
|
|
|
|
'jira-plugin',
|
|
|
|
'jira-plugin',
|
2017-07-18 03:42:37 +02:00
|
|
|
['project-management'],
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/jira.svg',
|
2016-07-25 22:12:12 +02:00
|
|
|
secondary_line_text='(locally installed)',
|
2017-04-05 07:30:40 +02:00
|
|
|
display_name='JIRA',
|
2017-06-20 03:33:39 +02:00
|
|
|
doc='zerver/integrations/jira-plugin.md',
|
|
|
|
stream_name='jira',
|
2017-07-21 03:22:09 +02:00
|
|
|
legacy=True
|
2016-07-25 22:12:12 +02:00
|
|
|
),
|
2018-05-22 09:44:53 +02:00
|
|
|
'matrix': Integration('matrix', 'matrix', ['communication'],
|
|
|
|
doc='zerver/integrations/matrix.md'),
|
2017-04-05 07:35:34 +02:00
|
|
|
'mercurial': Integration(
|
|
|
|
'mercurial',
|
|
|
|
'mercurial',
|
2017-07-18 03:42:37 +02:00
|
|
|
['version-control'],
|
2017-04-05 07:35:34 +02:00
|
|
|
display_name='Mercurial (hg)',
|
2017-06-22 04:22:41 +02:00
|
|
|
doc='zerver/integrations/mercurial.md',
|
|
|
|
stream_name='commits',
|
2017-04-05 07:35:34 +02:00
|
|
|
),
|
2017-07-06 22:04:22 +02:00
|
|
|
'nagios': Integration('nagios', 'nagios', ['monitoring'], doc='zerver/integrations/nagios.md'),
|
2017-04-05 07:46:08 +02:00
|
|
|
'openshift': Integration(
|
|
|
|
'openshift',
|
|
|
|
'openshift',
|
2017-07-06 22:04:22 +02:00
|
|
|
['deployment'],
|
2017-04-05 07:46:08 +02:00
|
|
|
display_name='OpenShift',
|
2017-06-21 20:48:34 +02:00
|
|
|
doc='zerver/integrations/openshift.md',
|
|
|
|
stream_name='deployments',
|
2017-04-05 07:46:08 +02:00
|
|
|
),
|
2017-07-18 03:42:37 +02:00
|
|
|
'perforce': Integration('perforce', 'perforce', ['version-control'],
|
2017-07-06 22:04:22 +02:00
|
|
|
doc='zerver/integrations/perforce.md'),
|
2017-07-18 03:42:37 +02:00
|
|
|
'phabricator': Integration('phabricator', 'phabricator', ['version-control'],
|
2017-07-06 22:04:22 +02:00
|
|
|
doc='zerver/integrations/phabricator.md'),
|
|
|
|
'puppet': Integration('puppet', 'puppet', ['deployment'], doc='zerver/integrations/puppet.md'),
|
2017-11-10 03:34:13 +01:00
|
|
|
'redmine': Integration('redmine', 'redmine', ['project-management'],
|
|
|
|
doc='zerver/integrations/redmine.md'),
|
|
|
|
'rss': Integration('rss', 'rss', ['communication'],
|
|
|
|
display_name='RSS', doc='zerver/integrations/rss.md'),
|
2017-07-18 03:42:37 +02:00
|
|
|
'svn': Integration('svn', 'svn', ['version-control'], doc='zerver/integrations/svn.md'),
|
|
|
|
'trac': Integration('trac', 'trac', ['project-management'], doc='zerver/integrations/trac.md'),
|
2016-07-25 22:12:12 +02:00
|
|
|
'trello-plugin': Integration(
|
|
|
|
'trello-plugin',
|
|
|
|
'trello-plugin',
|
2017-07-18 03:42:37 +02:00
|
|
|
['project-management'],
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/trello.svg',
|
2016-07-25 22:12:12 +02:00
|
|
|
secondary_line_text='(legacy)',
|
2017-04-05 08:09:53 +02:00
|
|
|
display_name='Trello',
|
2017-06-22 13:19:34 +02:00
|
|
|
doc='zerver/integrations/trello-plugin.md',
|
|
|
|
stream_name='trello',
|
2017-07-21 03:22:09 +02:00
|
|
|
legacy=True
|
2016-07-25 22:12:12 +02:00
|
|
|
),
|
2017-07-18 03:42:37 +02:00
|
|
|
'twitter': Integration('twitter', 'twitter', ['customer-support', 'marketing'],
|
2019-02-22 05:07:06 +01:00
|
|
|
# _ needed to get around adblock plus
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/twitte_r.svg',
|
2017-07-06 22:04:22 +02:00
|
|
|
doc='zerver/integrations/twitter.md'),
|
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 01:09:50 +02:00
|
|
|
}
|
2016-07-25 22:12:12 +02:00
|
|
|
|
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 01:09:50 +02:00
|
|
|
BOT_INTEGRATIONS: List[BotIntegration] = [
|
2017-09-17 02:28:59 +02:00
|
|
|
BotIntegration('github_detail', ['version-control', 'bots'],
|
|
|
|
display_name='GitHub Detail'),
|
2019-02-17 00:29:14 +01:00
|
|
|
BotIntegration('xkcd', ['bots', 'misc'], display_name='xkcd',
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/xkcd.png'),
|
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 01:09:50 +02:00
|
|
|
]
|
2017-09-17 02:28:59 +02:00
|
|
|
|
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 01:09:50 +02:00
|
|
|
HUBOT_INTEGRATIONS: List[HubotIntegration] = [
|
2017-11-15 23:01:12 +01:00
|
|
|
HubotIntegration('assembla', ['version-control', 'project-management'],
|
|
|
|
display_name='Assembla', logo_alt='Assembla'),
|
2017-12-06 11:38:24 +01:00
|
|
|
HubotIntegration('bonusly', ['hr']),
|
|
|
|
HubotIntegration('chartbeat', ['marketing'], display_name='Chartbeat'),
|
|
|
|
HubotIntegration('darksky', ['misc'], display_name='Dark Sky',
|
|
|
|
logo_alt='Dark Sky logo'),
|
|
|
|
HubotIntegration('google-hangouts', ['communication'], display_name='Google Hangouts',
|
|
|
|
logo_alt='Google Hangouts logo'),
|
2019-02-22 05:07:06 +01:00
|
|
|
HubotIntegration('instagram', ['misc'], display_name='Instagram',
|
|
|
|
# _ needed to get around adblock plus
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/instagra_m.svg'),
|
2017-12-06 11:38:24 +01:00
|
|
|
HubotIntegration('mailchimp', ['communication', 'marketing'],
|
|
|
|
display_name='MailChimp'),
|
|
|
|
HubotIntegration('google-translate', ['misc'],
|
|
|
|
display_name="Google Translate", logo_alt='Google Translate logo'),
|
2019-02-22 05:07:06 +01:00
|
|
|
HubotIntegration('youtube', ['misc'], display_name='YouTube',
|
|
|
|
# _ needed to get around adblock plus
|
2019-07-17 01:52:30 +02:00
|
|
|
logo='images/integrations/logos/youtub_e.svg'),
|
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 01:09:50 +02:00
|
|
|
]
|
2017-10-07 12:30:49 +02:00
|
|
|
|
|
|
|
for hubot_integration in HUBOT_INTEGRATIONS:
|
|
|
|
INTEGRATIONS[hubot_integration.name] = hubot_integration
|
|
|
|
|
|
|
|
for webhook_integration in WEBHOOK_INTEGRATIONS:
|
|
|
|
INTEGRATIONS[webhook_integration.name] = webhook_integration
|
2017-09-17 02:28:59 +02:00
|
|
|
|
|
|
|
for bot_integration in BOT_INTEGRATIONS:
|
|
|
|
INTEGRATIONS[bot_integration.name] = bot_integration
|