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

Feature: 为 reference 提供一种更易用的使用方式 #30

Merged
merged 4 commits into from
Feb 28, 2023

Conversation

felinae98
Copy link
Contributor

  • 在 pyproject.toml 中加入 pyright 的设置
  • 为 MessageSegment.reference 加入新的更易用的使用方式

NOTE:在这个新增加的使用方式中使用了新的签名,但是 impl 的代码变得丑陋并且不易读。当然如果把 referencemessage_id 两个变量名统一后这里的实现会简单很多,但是 reference: MessageReferencemessage_id: str 所代表的含义不同,所以认为参数名上还是做一个区分的好。所以这里也请教一下 reference impl 的写法有没有更加好的形式

@yanyongyu yanyongyu added the enhancement New feature or request label Feb 28, 2023
@yanyongyu yanyongyu changed the title 为 reference 提供一种更易用的使用方式 Feature: 为 reference 提供一种更易用的使用方式 Feb 28, 2023
@yanyongyu yanyongyu merged commit c38cda9 into nonebot:master Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants