Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docker_test): 修复插件测试获取到的插件元数据主页为空时报错的问题 #280

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

he0119
Copy link
Member

@he0119 he0119 commented Nov 20, 2024

NoneBot 中是允许 homepage 为空的。

@dataclass(eq=False)
class PluginMetadata:
    """插件元信息,由插件编写者提供"""

    name: str
    """插件名称"""
    description: str
    """插件功能介绍"""
    usage: str
    """插件使用方法"""
    type: Optional[str] = None
    """插件类型,用于商店分类"""
    homepage: Optional[str] = None
    """插件主页"""
    config: Optional[Type[BaseModel]] = None  # noqa: UP006
    """插件配置项"""
    supported_adapters: Optional[set[str]] = None
    """插件支持的适配器模块路径

    格式为 `<module>[:<Adapter>]`,`~` 为 `nonebot.adapters.` 的缩写。

    `None` 表示支持**所有适配器**。
    """
    extra: dict[Any, Any] = field(default_factory=dict)
    """插件额外信息,可由插件编写者自由扩展定义"""

@github-actions github-actions bot added the bug Something isn't working label Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.50%. Comparing base (f7eee94) to head (6937f33).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #280   +/-   ##
=======================================
  Coverage   87.50%   87.50%           
=======================================
  Files          37       37           
  Lines        1992     1992           
=======================================
  Hits         1743     1743           
  Misses        249      249           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@he0119 he0119 merged commit 745c9b8 into main Nov 20, 2024
10 checks passed
@he0119 he0119 deleted the fix/optional-homepage branch November 20, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants