🔀 Merge pull request #448

飞书适配器import顺序格式化
This commit is contained in:
Ju4tCode 2021-07-23 15:10:55 +08:00 committed by GitHub
commit fb6e5a69f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 18 deletions

View File

@ -1,22 +1,23 @@
import httpx
import json
import re
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union
from aiocache import cached, Cache
import httpx
from aiocache import Cache, cached
from aiocache.serializers import PickleSerializer
from typing import Any, Dict, Tuple, Union, Optional, TYPE_CHECKING
from nonebot.log import logger
from nonebot.typing import overrides
from nonebot.message import handle_event
from nonebot.adapters import Bot as BaseBot
from nonebot.drivers import Driver, HTTPRequest, HTTPResponse
from nonebot.log import logger
from nonebot.message import handle_event
from nonebot.typing import overrides
from .config import Config as FeishuConfig
from .event import Event, GroupMessageEvent, MessageEvent, PrivateMessageEvent, Reply, get_event_model
from .event import (Event, GroupMessageEvent, MessageEvent,
PrivateMessageEvent, get_event_model)
from .exception import ActionFailed, ApiNotAvailable, NetworkError
from .message import Message, MessageSegment, MessageSerializer
from .utils import log, AESCipher
from .utils import AESCipher, log
if TYPE_CHECKING:
from nonebot.config import Config

View File

@ -1,9 +1,9 @@
import inspect
import json
from typing import Any, Dict, List, Literal, Optional, Type
from pydantic import BaseModel, Field, root_validator
from pygtrie import StringTrie
from pydantic import BaseModel, root_validator, Field
from nonebot.adapters import Event as BaseEvent
from nonebot.typing import overrides

View File

@ -1,9 +1,9 @@
from typing import Optional
from nonebot.exception import (AdapterException, ActionFailed as
BaseActionFailed, NetworkError as
BaseNetworkError, ApiNotAvailable as
BaseApiNotAvailable)
from nonebot.exception import ActionFailed as BaseActionFailed
from nonebot.exception import AdapterException
from nonebot.exception import ApiNotAvailable as BaseApiNotAvailable
from nonebot.exception import NetworkError as BaseNetworkError
class FeishuAdapterException(AdapterException):

View File

@ -1,10 +1,11 @@
import json
import itertools
import json
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple, Type, Union, Mapping, Iterable
from typing import (Any, Dict, Iterable, List, Mapping, Optional, Tuple, Type,
Union)
from nonebot.adapters import Message as BaseMessage, MessageSegment as BaseMessageSegment
from nonebot.adapters import Message as BaseMessage
from nonebot.adapters import MessageSegment as BaseMessageSegment
from nonebot.typing import overrides

View File

@ -2,6 +2,7 @@ import base64
import hashlib
from Crypto.Cipher import AES
from nonebot.utils import logger_wrapper
log = logger_wrapper("FEISHU")