perf: 优化导入错误

pull/12514/head
ibuler 2024-01-08 17:29:59 +08:00 committed by 老广
parent b57e943990
commit 496b72aaee
1 changed files with 4 additions and 6 deletions

View File

@ -1,16 +1,14 @@
import requests
import mistune import mistune
import requests
from rest_framework.exceptions import APIException
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework.exceptions import APIException
from users.utils import construct_user_email
from common.utils.common import get_logger from common.utils.common import get_logger
from jumpserver.utils import get_current_request from jumpserver.utils import get_current_request
from users.utils import construct_user_email
logger = get_logger(__name__) logger = get_logger(__name__)
SLACK_REDIRECT_URI_SESSION_KEY = '_slack_redirect_uri' SLACK_REDIRECT_URI_SESSION_KEY = '_slack_redirect_uri'
@ -22,7 +20,7 @@ class URL:
AUTH_TEST = 'https://slack.com/api/auth.test' AUTH_TEST = 'https://slack.com/api/auth.test'
class SlackRenderer(mistune.renderers.HTMLRenderer): class SlackRenderer(mistune.HTMLRenderer):
def heading(self, text, level): def heading(self, text, level):
return '*' + text + '*\n' return '*' + text + '*\n'