python: Sort imports in webhooks.

This commit is contained in:
Tim Abbott
2017-11-15 15:43:10 -08:00
parent c377db7d04
commit 73a668e7ae
89 changed files with 375 additions and 333 deletions

View File

@@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
from mock import patch, MagicMock
from typing import Optional, Text
from zerver.lib.webhooks.git import COMMITS_LIMIT
from mock import MagicMock, patch
from zerver.lib.test_classes import WebhookTestCase
from zerver.lib.webhooks.git import COMMITS_LIMIT
class GitlabHookTests(WebhookTestCase):
STREAM_NAME = 'gitlab'

View File

@@ -1,17 +1,18 @@
from functools import partial
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.actions import check_send_stream_message
from zerver.lib.response import json_success
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.webhooks.git import get_push_commits_event_message, EMPTY_SHA,\
get_remove_branch_event_message, get_pull_request_event_message,\
get_issue_event_message, SUBJECT_WITH_PR_OR_ISSUE_INFO_TEMPLATE,\
get_commits_comment_action_message, get_push_tag_event_message
from zerver.models import UserProfile
from typing import Any, Dict, Iterable, Optional, Text
from django.http import HttpRequest, HttpResponse
from typing import Dict, Any, Iterable, Optional, Text
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.actions import check_send_stream_message
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.webhooks.git import EMPTY_SHA, \
SUBJECT_WITH_PR_OR_ISSUE_INFO_TEMPLATE, \
get_commits_comment_action_message, get_issue_event_message, \
get_pull_request_event_message, get_push_commits_event_message, \
get_push_tag_event_message, get_remove_branch_event_message
from zerver.models import UserProfile
class UnknownEventType(Exception):
pass