Skip to content

Commit

Permalink
fix: 再次修复python3.8中无法导入的问题 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssttkkl authored Sep 5, 2023
1 parent 0aa2135 commit bc5032d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
15 changes: 0 additions & 15 deletions bot.py

This file was deleted.

6 changes: 3 additions & 3 deletions nonebot/adapters/kaiheila/bot.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import re
from io import BytesIO, BufferedReader
from os import PathLike
from pathlib import Path
from typing import Any, Union, TYPE_CHECKING, BinaryIO, Dict, Optional, Literal, Callable
from typing import Any, Union, TYPE_CHECKING, BinaryIO, Optional, Literal, Callable

from nonebot.adapters import Bot as BaseBot
from nonebot.message import handle_event
Expand All @@ -14,6 +13,7 @@
from .utils import log

if TYPE_CHECKING:
from os import PathLike
from .event import Event
from .adapter import Adapter
from .message import Message, MessageSegment
Expand Down Expand Up @@ -340,7 +340,7 @@ async def send_msg(

return await self.call_api(api, **params)

async def upload_file(self, file: Union[str, PathLike[str], BinaryIO, bytes],
async def upload_file(self, file: Union[str, 'PathLike[str]', BinaryIO, bytes],
filename: Optional[str] = None) -> str:
"""
上传文件。
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-adapter-kaiheila"
version = "0.2.11"
version = "0.2.12"
description = "kaiheila adapter for nonebot2"
authors = ["Tian-que <1605206150@qq.com>", "ssttkkl <huang.wen.long@hotmail.com>"]
license = "MIT"
Expand Down

0 comments on commit bc5032d

Please sign in to comment.