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

@@ -6,6 +6,7 @@ from mock import MagicMock, patch
from zerver.lib.test_classes import WebhookTestCase
from zerver.lib.webhooks.git import COMMITS_LIMIT
class BeanstalkHookTests(WebhookTestCase):
STREAM_NAME = 'commits'
URL_TEMPLATE = u"/api/v1/external/beanstalk?stream={stream}"

View File

@@ -1,22 +1,22 @@
# Webhooks for external integrations.
import base64
from functools import wraps
from typing import Any, Dict, Optional, List, Tuple
import re
from functools import wraps
from typing import Any, Dict, List, Optional, Tuple
from django.http import HttpRequest, HttpResponse
from zerver.decorator import authenticated_rest_api_view
from zerver.lib.types import ViewFuncT
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.types import ViewFuncT
from zerver.lib.validator import check_dict
from zerver.lib.webhooks.common import check_send_webhook_message
from zerver.lib.webhooks.git import TOPIC_WITH_BRANCH_TEMPLATE, \
get_push_commits_event_message
from zerver.lib.validator import check_dict
from zerver.models import UserProfile
def build_message_from_gitlog(user_profile: UserProfile, name: str, ref: str,
commits: List[Dict[str, str]], before: str, after: str,
url: str, pusher: str, forced: Optional[str]=None,