python: Sort webhooks imports with isort.

This commit is contained in:
Tim Abbott
2020-01-14 13:06:24 -08:00
parent 8e7ce7cc79
commit c10cc24ee8
129 changed files with 238 additions and 180 deletions

View File

@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase
class Bitbucket3HookTests(WebhookTestCase):
STREAM_NAME = "bitbucket3"
URL_TEMPLATE = "/api/v1/external/bitbucket3?stream={stream}&api_key={api_key}"

View File

@@ -1,23 +1,23 @@
from inspect import signature
from functools import partial
import string
from typing import Any, Dict, Optional, List, Callable
from functools import partial
from inspect import signature
from typing import Any, Callable, Dict, List, Optional
from django.http import HttpRequest, HttpResponse
from zerver.models import UserProfile
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.webhooks.git import TOPIC_WITH_BRANCH_TEMPLATE, \
get_push_tag_event_message, get_remove_branch_event_message, \
get_create_branch_event_message, get_commits_comment_action_message, \
TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE, get_pull_request_event_message, \
CONTENT_MESSAGE_TEMPLATE
from zerver.lib.webhooks.common import check_send_webhook_message, \
UnexpectedWebhookEventType
from zerver.webhooks.bitbucket2.view import BITBUCKET_TOPIC_TEMPLATE, \
BITBUCKET_FORK_BODY, BITBUCKET_REPO_UPDATED_CHANGED
from zerver.lib.webhooks.common import UnexpectedWebhookEventType, \
check_send_webhook_message
from zerver.lib.webhooks.git import CONTENT_MESSAGE_TEMPLATE, \
TOPIC_WITH_BRANCH_TEMPLATE, TOPIC_WITH_PR_OR_ISSUE_INFO_TEMPLATE, \
get_commits_comment_action_message, get_create_branch_event_message, \
get_pull_request_event_message, get_push_tag_event_message, \
get_remove_branch_event_message
from zerver.models import UserProfile
from zerver.webhooks.bitbucket2.view import BITBUCKET_FORK_BODY, \
BITBUCKET_REPO_UPDATED_CHANGED, BITBUCKET_TOPIC_TEMPLATE
BRANCH_UPDATED_MESSAGE_TEMPLATE = "{user_name} pushed to branch {branch_name}. Head is now {head}."
PULL_REQUEST_MARKED_AS_NEEDS_WORK_TEMPLATE = "{user_name} marked [PR #{number}]({url}) as \"needs work\"."