Skip to content

Commit

Permalink
fix: 修复导入错误 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssttkkl authored Sep 4, 2023
1 parent 117fa06 commit 29e20c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions nonebot/adapters/kaiheila/message.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
import warnings
from dataclasses import dataclass
from typing import Any, Type, Tuple, Union, Mapping, Iterable, Dict, cast, Optional

from deprecated import deprecated
from nonebot.adapters import Message as BaseMessage
from nonebot.adapters import MessageSegment as BaseMessageSegment
from nonebot.typing import overrides
Expand Down Expand Up @@ -100,8 +100,11 @@ def is_text(self) -> bool:
return self.type == "text" or self.type == "kmarkdown"

@staticmethod
@deprecated("用 KMarkdown 语法 (met)用户id/here/all(met) 代替")
def at(user_id: str) -> "MessageSegment":
warnings.warn(
"用 KMarkdown 语法 (met)用户id/here/all(met) 代替",
DeprecationWarning,
)
return MessageSegment.KMarkdown(f"(met){user_id}(met)", user_id)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 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.9"
version = "0.2.10"
description = "kaiheila adapter for nonebot2"
authors = ["Tian-que <1605206150@qq.com>", "ssttkkl <huang.wen.long@hotmail.com>"]
license = "MIT"
Expand All @@ -20,7 +20,6 @@ nonebot2 = "^2.0.0"
#name = "aliyun"
#url = "https://mirrors.aliyun.com/pypi/simple/"
#default = true
typing-extensions = "^4.7.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit 29e20c0

Please sign in to comment.